I've been trying to make a script where when you capture a flag,
it would say : "Our flag has been taken"
and for the enemy it would say : "Enemy flag taken"
So this is what I've made. (And failed ofc. )
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("flagtake","on_flag_take") 	function on_flag_take(id,team,x,y) 	 	if player(id,"team") == 1 then 	parse("sv_sound2 "..player(id,"team1").." Neva_FlagHasBeenTak.wav ") 	parse("sv_sound2 "..player(id,"team2").." Geva_FlagHasBeenTak.wav ") 	elseif player(id,"team") == 2 then 	parse("sv_sound2 "..player(id,"team1").." Neva_FlagHasBeenTak.wav ") 	parse("sv_sound2 "..player(id,"team2").." Geva_FlagHasBeenTak.wav ") end end
I've checked console for what it says and got this :
1
2
3
2
3
LUA ERROR: sys/lua/autorun/TEST.lua:154: attempt to concatenate a boolean value -> sys/lua/autorun/TEST.lua:154: in function <sys/lua/autorun/TEST.lua:148> -> in Lua hook 'flagtake', params: 1, 2, 3
edited 1×, last 03.02.18 09:04:44 pm