Forum
CS2D Scripts couldnt find delete topic button, sorrycouldnt find delete topic button, sorry
26 replies VADemon has written
Array itself isn't that bad. Worser is, that it's a global.
file too.
file too.
Amen to that words.
@ EP:
I know that, but I think my way will be much times better because way to save everything will be much easier.
also its not about array,its about save & load please, help me about that -.-"
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function saves(id) 	if player(id,"usgn")~=0 and id>0 and id<33 then file = io.open("allsavedatas/arraysaves/"..player(id,"usgn")..".txt","w+") file:write(tostring(career[id]).." "..tostring(money[id]).." "..tostring(aclik[id]).." "..tostring(referer[id]).." "..tostring(jail[id]).." "..tostring(saycolor[id]).." "..tostring(mute[id]).." "..tostring(locked[id]).." "..tostring(commandcooldown[id]).." "..tostring(shootingrange[id])) file:close() msg2(id,'©107142035Save Game Successfull!@C') end end 	 player_dat={} function loads(id) if player(id,"usgn")~=0 and id>0 and id<33 then for line in io.lines("allsavedatas/arraysaves/"..player(id,"usgn")..".txt") do player_dat[id]={line:match("(.*) (.*) (.*) (.*) (.*) (.*) (.*) (.*) (.*) (.*)")} 			 career[id]=tonumber(player_dat[id][1]) 			 money[id]=tonumber(player_dat[id][2]) 			 aclik[id]=tonumber(player_dat[id][3]) 			 referer[id]=tonumber(player_dat[id][4]) 			 jail[id]=tonumber(player_dat[id][5]) 			 saycolor[id]=tonumber(player_dat[id][6]) 			 mute[id]=tonumber(player_dat[id][7]) 			 locked[id]=tonumber(player_dat[id][8]) 			 commandcooldown[id]=tonumber(player_dat[id][9]) 			 shootingrange[id]=tonumber(player_dat[id][10]) end end end
that code works
but still LUA ERROR: sys/lua/savenload.lua:3: attempt to concatenate a boolean value
edited 3×, last 16.08.12 12:12:46 am
1
if player(id,"usgn") and player(id,"usgn")~=0 and id>0 and id<33 then
no more error