Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
24 May, 2013, 11:53:01 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: [1]   Go Down
  Print  
Author Topic: string - duplicate symbol -  (Read 775 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Michael_Lee
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: 09 August, 2012, 18:48:39
Date Registered: 05 August, 2010, 01:00:06
Posts: 1020

Total Post Ratings: +115

View Profile
« on: 24 August, 2011, 17:59:57 »
0

Try making the length of Str1 much larger then you need it to be -- I don't think it's easy to change the size of a constant after it's declared.

1
2
3
4
5
Zeros(50)->Str1

Copy("String 1",Str1,8)
Copy("The next string",Str1,15)

Alternatively, you could use either a buffer (like L1, L2, etc.) or an appvar.
This might not work/probably needs tweaking, but try something like:

1
2
3
4
5
6
Zeros(700)->L1
"Hello World!"->L1
Text(10,10,L1)
"Goodbye"[00]->L1
Text(10,20,L1)
(The [00] adds a null byte, just in case)

Also, I'm trying to remember -- if you compile as an app, can you rewrite program memory like Str1 or Pic02?

Edit:
Changed 'Zero(pointer,size)' to 'Zero(size)->pointer'
« Last Edit: 24 August, 2011, 18:24:56 by Michael_Lee » Logged

My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.174 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.