Plate Posted April 9, 2013 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 )
Castillo Posted April 9, 2013 Posted April 9, 2013 Estas usando "zombieLevel" en tu "if" y "elseif", pero tu variable es "zombiesLevel".
Plate Posted April 9, 2013 Author Posted April 9, 2013 ahora me dice attempt to comparate a number whit boolean
Plate Posted April 9, 2013 Author 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
NodZen Posted April 9, 2013 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
Plate Posted April 9, 2013 Author Posted April 9, 2013 Ni idea si el jugador tiene experiencia 0 me da error pero si tiene + de 0 hay si ya funciona
NodZen Posted April 9, 2013 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'
Recommended Posts