Forum

> > CS2D > Scripts > couldnt find delete topic button, sorry
Forums overviewCS2D overview Scripts overviewLog in to reply

English couldnt find delete topic button, sorry

26 replies
Page
To the start Previous 1 2 Next To the start

old Re: couldnt find delete topic button, sorry

loldlold123
User Off Offline

Quote
damn then tell me what i should use stop telling WHY ARE YOU USING ARRAY cookie

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
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

old Re: couldnt find delete topic button, sorry

EngiN33R
Moderator Off Offline

Quote
Try putting a debug message to print(tostring(player(id,"usgn")))? Also, the if statement on the second line, try changing it to that:
1
if player(id,"usgn") and player(id,"usgn")~=0 and id>0 and id<33 then
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview