Javier Posted March 26, 2013 Posted March 26, 2013 Hola chicos, miren este script, me dice BOSS\Jason.lua:22: Bad argument @ 'getElementPosition' [Expected element at argument 1, got nil] El script function kill ( slothbot ) local x, y, z = getElementPosition( slothbot ) -- Este me dice que está mal.. local hora,minuto = getTime() if ( hora == 02 and minuto == 58 ) then createExplosion(x, y, z, 4) killPed( slothbot ) destroyElement( blip ) outputChatBox("NEMESIS HA SIDO DESTRUIDO", getRootElement(), 0, 255, 0) end end setTimer(kill, 2000, 0)
Renkon Posted March 26, 2013 Posted March 26, 2013 Debes pasar en el setTimer el argumento que usaras como slothbot
Javier Posted March 26, 2013 Author Posted March 26, 2013 Debes pasar en el setTimer el argumento que usaras como slothbot Como?.
Javier Posted March 26, 2013 Author Posted March 26, 2013 asi?, No entiendo. setTimer(getElementPosition, 5000, 0, (slothbot))
Castillo Posted March 26, 2013 Posted March 26, 2013 function kill ( slothbot ) Borra slothbot de ahi.
Javier Posted March 27, 2013 Author Posted March 27, 2013 Gracias Solidsnake Ahora si anda, el unico problema es que cuadno no está el BOT , me dá en la consola Bad Argumente. Pero el scrpt en Si anda.
Castillo Posted March 27, 2013 Posted March 27, 2013 Pone: if isElement ( slothbot ) then -- El codigo tuyo aqui. end dentro de la funcion del timer.
Recommended Posts