Hi guys, i've this problem:
Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
Code here:
function Tog (thePlayer,matchingDimension)
Are = createColRectangle ( 342.54418945313, -2093.8819476563, 65, 70 )
Radar = createRadarArea ( 342.54418945313, -2093.8819476563, 65, 500, 255, 200, 0, 150 )
if (getElementType(thePlayer) == "player") then
toggleControl(thePlayer,"fire",false)
toggleControl(thePlayer,"next_weapon ",false)
toggleControl(thePlayer,"previous_weapon ",false)
toggleControl(thePlayer,"sprint",false)
end
end
addEventHandler ( "onColShapeHit", Are, Tog)