Fenix From Pc To Gp Problem


Bampt

Member
Joined
Mar 29, 2005
Messages
115
Location
Germany
Website
nextadventures.webs.com
Hello everyone! I have a problem on one of my fenix prgs.
I made a prg wich stores 6Strings in a *.lst file I wanted to use it for creating own Levelsets for my game project. I runned this program under Windows and it successfully created my list. I was also able to load the List in my game...
But when I put this *.lst file and all the other needed stuff on my Gp32.
Whenn I select Load Levellist and the program succesfully had found the *.lst file... It restarts the Gp32 whithout any error message :eek:
My structure which is saved in the *.lst file looks like this:

STRUCT LEL[5]
STRING NAME;
END

Can anybody help me with this?
 
Hmm serious problem, I wasn`t able to save strings in a file, only numbers/int and float, for pc and gp32, I have a encoding system that changes numbers to letters for the profiles in the minigame project...
 
You mean I should change the strings to integer before saving and when loading restore them to strings? I´ll try this out thanks B)

Added: Could somebody please tell me the string to int command and the int to string command?
Tried it now but it didn´t work with itoa... Looks like I need another command :unsure:
 
Code:
// defined constants:
arrayLength = 100;
// variables:
array[arrayLength];
string boom;
i;

// convert string into the array:
for(i=0;i<len(boom) and i <= arrayLength;i++)
  array[i] = asc(substr(boom,i,1));
end

// convert the array back to a string:
boom = "";
for(i=0;i <= arrayLength and array[i] > 0;i++)
  boom += chr(array[i]);
end

itoa() is for converting a string like "12345" to the number 12345. :)
 
Not to missunderstand this...
If I want more Strings than one saved I´ll need
Code:
Struct blah[5]
array[20]
End
So for each letter an array space...
I´ll try this one!
Thank you really much! :D
Added:
Okay tried it but now it crashes when i am using it on my PC and my GP...
But the file is created properly when I open it I can read all the levelnames... <_<
 
Back
Top