Re: Bug or Error

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi

Instead of

handle = open(fName,"wb")

try

handle = open(fName,"w")

Since you are not actually writing binary data.

Secondly, I would have thought that there's a large number of global variable there. Probably too late, but another way of doing this would be to to define a global sequence (I know, I know), and use constants to define each element of the sequence.

So for instance

global constant HP = 1,
Max_HP = 2,
MP = 3,

and so on

then you have your global sequence

global sequence Char_attribs = repeat("", number_of_attribs_above)

Then when it comes to writing out your file

for i = 1 to length(Char_atribs) do puts(handle, Char_attrib[i]) end for

BUT, an even better way would be to use eds or sqlite to write out the sequences, then they they could be easily modified as you saw fit, without having to re write the whole file each time.

This may not help, but make sure you have initialised all the variables, and see what happens if you only try to save smaller chunks.

Chris

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu