Nicolas ECM Posted May 29, 2016 Posted May 29, 2016 Hola a todos, sera que me podrian ayudar con un error del slothbot que es ERROR:Slothbot/sbclient.lua:115: attempt to compare boolean with number esa es la parte donde aparece el error, no se porque pasara porfavor ayuda function chase_shoot(ped) if (isElement(ped)) then local player = getElementData ( ped, "target" ) if (isElement(player)) and (getElementData (ped, "slothbot") == true) then if (getElementType(player) == "ped") or (getElementType(player) == "player") then if (getElementData ( ped, "status" ) == "chasing" ) and (isElement(player)) then if (getElementHealth(ped)>0) and (getElementHealth(player)>0) and (getElementData ( ped, "controller" ) == getLocalPlayer()) then local x,y,z = getElementPosition( player ) local ex,ey,ez = getElementPosition( ped ) local isclear = isLineOfSightClear (ex, ey, ez+1, x, y, z+1, true, false, false, true, false, false, false) if isclear == true then -- if the ped can see the local player local distance = (getDistanceBetweenPoints3D (ex, ey, ez, x, y, z)) if (getPedWeapon(ped) < 19) and (getPedWeapon(ped) ~= 9) then -- if its a melee weapon hat isnt a chainsaw if (distance < 2 ) then triggerServerEvent ( "pedShootTrigger", ped, "melee" ) setTimer ( chase_shoot, 2300, 1, ped, player ) else setTimer ( chase_shoot, 1500 ,1 , ped, player ) end
Castillo Posted May 29, 2016 Posted May 29, 2016 Y la linea 115 cual seria? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Bc# Posted May 29, 2016 Posted May 29, 2016 if (isElement(player)) and (getElementData (ped, "slothbot") then Bc Media Clan XPG Foro mtasa://104.223.20.159:21003
Simple0x47 Posted May 30, 2016 Posted May 30, 2016 if (isElement(player)) and (getElementData (ped, "slothbot") then Intenta, porque a lo mejor se encuentra con 0 para false y 1 para true. if (isElement(player)) and (getElementData (ped, "slothbot") == 1) then "Keep making it simplex."
Bc# Posted May 30, 2016 Posted May 30, 2016 En un if un 0 es false (nose si en lua tambien sea asi), por lo que no tienes necesidad de hacer la comparacion. Bc Media Clan XPG Foro mtasa://104.223.20.159:21003
Recommended Posts