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*)
Suggestions:
Use INI filesMake the save files server side (if you do this, you won't need encryption)Only save important things (x,y,room,password,name,level,etc.)A) ini files are insecure, and a bit of a pain
B) With all these variables, the accounts folder could get pretty large.C) Everything I save is 100% necessary.But thanks anyway. [:)]
Do you close the files?
First off, you should NEVER do this:
If I were making an MMORPG, I would save all the stats in a database to prevent any local hacking attempt. Plus it would get a bit cluttered with a bunch of random text files everywhere.
I was thinking Archaotica or Team Awesome
Archaotica is pretty much dead, and no, you can't join Team Awesome.Archaotica is dead. There was only one loyal member. I'm with Team Awesome now.
I miss the name though. >_<Aw… So I can't join either of them? [:(]
Do you need to save just the stats, or could you just use game_load()?