proc
SavePlanets()
var/savefile/S=new("planets")
var/index=1
for(var/obj/O)
S["/obj[index]"]<<O
S["/objnum"]<<index
LoadPlanets()
var/savefile/S=new("planets")
var/object_max
var/obj/O
S["/objnum"]>>object_max
for(var/index=1,index<=object_max,index+=1)
S["/obj[index]"]>>O
ID:171494
Sep 15 2004, 1:52 pm
|
|
Can anyone help me on whats wrong with this obj saving code?
|
Sep 15 2004, 2:06 pm
|
|
Index is never incremented.
|
In response to Garthor
|
|
Sorry, im being dense here...what?
|
In response to Metroid
|
|
He means here:
for(var/obj/O) index is never increased(incremented) so all of your obj are saved in the same index for(var/obj/O) or for(var/obj/O) Would both work in this case. |
In response to Hobbesx
|
|
Hmmm...still doesnt work...any more problems with it?
Wait, would I need to do index++ for both save and load? Edit: Nvm, I tried with both, still doesnt work X_X |
In response to Metroid
|
|
Metroid wrote:
Hmmm...still doesnt work...any more problems with it? Damnit! I really need help! Please help! |
In response to Metroid
|
|
I redid this code, I dont know what was wrong, but it works now, I no longer need help.
|