neo22
Member
|
File, weird behavior
Hello,
I' have a problem with one of my files.
i use it to save the Path to an item on my game server.
the problem is when i load the file, I get a totally different content than the one I put before.
here is an example of what i do (I'm still using the default items)
Code:
First try:
Save : Obj\item\weapon\blunt\Mace\0.obj // String that is save using f.putStr()
Load : Obj\
em\weapon\blunt\Mace\0.obj // String that is load back
Second try after restart :
Load : Obj\
orld/mmo.world/Game/Settin //far better
Do you have any idea of where it may coming from? because I'm stuck because of it.
sorry for spelling errors, English is not my native language.
|
|
10-04-2011 07:04 PM |
|
Esenthel
Administrator
|
RE: File, weird behavior
you'd need to put some more code
looks like you load data in other order than save, or different size, or skip some parts.
|
|
10-04-2011 08:08 PM |
|
neo22
Member
|
RE: File, weird behavior
Ok found it!
My structure is inherited from an other one that clearly has an issue.
the load method was f.putUint(Value); instead of Value=f.getUint();
it seem to be fixed now.
Thank's for your effective help.
|
|
10-04-2011 09:24 PM |
|