Forum

> > CS2D > Scripts > About Save/Load script...
Forums overviewCS2D overview Scripts overviewLog in to reply

English About Save/Load script...

2 replies
To the start Previous 1 Next To the start

old About Save/Load script...

Rainoth
Moderator Off Offline

Quote
I tried asking many people and they gave me advice but no matter how I do it, stuff doesn't work.

The Code >

Everything is saved and "hatss" appears as "0,0,0,0,0..." which is fine, but loading doesn't do anything. Can anyone tell me what I'm doing wrong ? Please pay attention to "line[1]" cause I'm not sure if it's correct. It was desperate guess. Hope you can help me.

old Re: About Save/Load script...

Starkkz
Moderator Off Offline

Quote
I'm not sure if this will make big changes but you can try file:lines() instead of io.lines, and define the local variable i to 1 instead of 0.

Edit: Just before the end of the if file then condition you should put file:close(), so you will be able to overwrite in that file when using your save function.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview