Forum

> > CS2D > Scripts > Error attemp on my script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Error attemp on my script

4 replies
To the start Previous 1 Next To the start

old Error attemp on my script

Pamoon
User Off Offline

Quote
Hi, there is next error, this:
LUA ERROR: sys/lua/autorun/exp.lua:126: attempt to concatenate a boolean value

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook("second","gpc")
function gpc(id)
for i = 1,32 do  
exp1[i] = exp1[i] + expc
if exp1[i] >= exp2[i] then	
			exp1[i] = exp1[i] - expp[i]
			lv1[i] = lv1[i] + 1
			Status(i)
			msg2(i,"©255255000[Server] WTF! Youre a hacker! To fast! @C")
			parse('effect "flare" '..player(i,"x")..' '..player(i,"y")..' 5 5 192 192 000')
			parse("sv_sound2 "..i.." Dog_eat_a_shjt/level_up.wav")
			msg("©255255000[Server] "..player(i,"name").." be "..lv1[i])
		end
end
end

old Re: Error attemp on my script

Dousea
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
addhook ("second", "secondhook")
function secondhook ()
	for key, id in pairs (player (0, "tableliving")) do
		exp1[id] = exp1[id] + expc
		if (exp1[id] >= exp2[id]) then
			exp1[id] = exp1[id] - expp[id]
			lv1[id] = lv1[id] + 1
			Status (id)
			msg2 (id, "\169255255000[Server] WTF! You're a hacker! To fast! @C")
			parse ("effect \"flare\" " .. player (id, "x") .. " " .. player (id, "y") .. " 5 5 192 192 0")
			parse ("sv_sound2 " .. id .. " \"Dog_eat_a_shjt/level_up.wav\"")
			msg ("\169255255000[Server] " .. player (id, "name") .. " be " .. lv1[id])
		end
	end
end
What about now? Maybe your problems are these. There's no "id" parameter in second hook, so you have to make a function without any parameters. Also you parse cs2d cmd sv_sound2, the path to your "soundfile" is not in text.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview