1
2
3
4
2
3
4
function set_plyrs()
parse("setpos "..pp[0].." "..T_spot[x].." "..T_spot[y]) -- This is where it errors ?
parse("setpos "..pp[1].." "..CT_spot[x].." "..CT_spot[y])
end
I cannot find anything wrong with it

EDIT: This '?' would also happen to be nil (?), so it must be one of the arrays, but I am sure they exists becasue I wrote just above it:
1
2
2
T_spot = { x="126", y="126" } -- in pixels! --
CT_spot = {x="384", y ="384" } -- in pixels! --
EDIT2: And pp is set where the set_plyrs() function is called:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("startround","pick_first")
function pick_first()
local T = player(0,"team1")
local CT = player(0,"team2")
pp[0]=T[math.random(0,#T)]
pp[1]=CT[math.random(0,#CT)]
set_plyrs()
end