Can someone help me with this script? It's supposed to count people with playerstoragevalue 1, and 2 in an area.
error:
Thx
Code:
while h < 6 do
fromPoz = {x = 1622, y = 1253, y = 7}
toPoz = { x = 1635, y = 1265, y = 7}
if(isInArea(getPlayerPosition(player[h]), fromPoz, toPoz)) then
if(getPlayerStorageValue(player[h], 1400)==1) then
countteamone = countteamone + 1
end
if(getPlayerStorageValue(player[h], 1400)==2) then
countteamtwo = countteamtwo + 1
end
end
end
error:
Code:
[21/05/2010 23:46:05] [Error - GlobalEvent Interface]
[21/05/2010 23:46:05] In a timer event called from:
[21/05/2010 23:46:05] data/globalevents/scripts/tp3v3.lua:onThink
[21/05/2010 23:46:05] Description:
[21/05/2010 23:46:05] data/lib/032-position.lua:2: attempt to index local 'position' (a boolean value)
[21/05/2010 23:46:05] stack traceback:
[21/05/2010 23:46:05] data/lib/032-position.lua:2: in function 'isInArea'
[21/05/2010 23:46:05] data/globalevents/scripts/tp3v3.lua:131: in function <data/globalevents/scripts/tp3v3.lua:40>
Thx