Plate Posted April 9, 2013 Share Posted April 9, 2013 Hola me podrian decir por que esto no anda addEvent ( "onZombieWasted", true ) addEventHandler ( "onZombieWasted", root, function ( killer ) if ( killer and getElementType ( killer ) == "player" ) then local zombiesLevel = getElementData ( source, "level" ) or 0 if (zombieLevel > 0) and (zombieLevel < 40) then setElementData(killer, "EXP", getElementData(killer, "EXP") + 300) elseif (zombieLevel > 41) and (zombieLevel < 50) then setElementData(killer, "EXP", getElementData(killer, "EXP") + 400) end end end ) Link to comment
Plate Posted April 9, 2013 Author Share Posted April 9, 2013 attempt to compare a number whit nil Link to comment
Castillo Posted April 9, 2013 Share Posted April 9, 2013 Estas usando "zombieLevel" en tu "if" y "elseif", pero tu variable es "zombiesLevel". Link to comment
Plate Posted April 9, 2013 Author Share Posted April 9, 2013 ahora me dice attempt to comparate a number whit boolean Link to comment
Plate Posted April 9, 2013 Author Share Posted April 9, 2013 Nop no falta 1 end 1 por la funcion otro por el primer if y otro por el segundo EDIT: Ya lo solucione muchas gracias nod y solid Link to comment
NodZen Posted April 9, 2013 Share Posted April 9, 2013 (edited) Nop no falta 1 end1 por la funcion otro por el primer if y otro por el segundo EDIT: Ya lo solucione muchas gracias nod y solid Cual era el problema? Edit, No problem Edited April 9, 2013 by Guest Link to comment
Plate Posted April 9, 2013 Author Share Posted April 9, 2013 Ni idea si el jugador tiene experiencia 0 me da error pero si tiene + de 0 hay si ya funciona Link to comment
NodZen Posted April 9, 2013 Share Posted April 9, 2013 Ni idea si el jugador tiene experiencia 0 me da error pero si tiene + de 0 hay si ya funciona Ponele entonces asi 'zombieLevel >= 0' Link to comment
Recommended Posts