Okay, THE most demanded feature on my MMORPG project, Element, is saving and loading. EVERY RPG must have this, it'd be a real shame to spend all day leveling up your character only to start over the next day. So I tried adding it, and it seems to do okay, but I get a TON of errors when I try loading. When I turn errors off and load, the player stops moving properly and the chat doesn't work! I really could use a hand, as no one I've asked knows what's wrong, it really should work.
Things in stars are things that could be used to hack, to be safe, I won't share them publicly.Saving:io_clear()
var fid;
fid=file_text_open_write(string(*Variable Name*)+string(".ele"))
file_text_write_string(fid,scr_cipher(string(*Variable Name*),*Encryption Key*,1))
file_text_writeln(fid)
file_text_write_string(fid,scr_cipher(string(*Variable Name*),*Encryption Key*,1))
file_text_writeln(fid)
io_clear()
var fid;
fid=file_text_open_read(string(global.username)+string(".ele"))
*Variable Name*=scr_cipher(file_text_read_string(fid),*Encryption Key*,0)
file_text_readln(fid)
*Variable Name*=real(*Variable Name*)
If you just need game_load(), I made an example that uses the slot system to save instead of dialog boxes or message boxes. It uses game_save() and game_load().
No, that works, but it messes up the online stuff so that most other players can't see you, and vice versa. I need to save only certain stats, like level, gold, ATK, DEF, Alignment, etc..
Is it the file_text_write_string() stuff that's acting up? I don't know much about arrays, but maybe you could make an array of the stats?
If you can't, I whipped up a little example for file_text_write_string(). Maybe you want to look at it? Here's the link: http://64digits.com/users/index.php?userid=jsorgeagames