Jump to content

Help


Recommended Posts

i have this error : attempt to concatenate a boolean value , in line 7

this my code :

--REMOVES A ZOMBIE FROM INFLUENCE AFTER ITS KILLED
function pedkilled ( killer, weapon, bodypart )
    local scorez = getElementData(killer, "scorez")
	if (getElementData (source, "zombie") == true) and (getElementData (source, "status") ~= "dead" ) then
		setElementData ( source, "target", nil )
		setElementData ( source, "status", "dead" )
	if getElementData(killer, "missionz") == 1 then
	   setElementData (killer, "scorez", scorez+1) 
	end
end
end
addEventHandler ( "onClientPedWasted", getRootElement(), pedkilled )

 

Link to comment

If an element data does not exist, it returns false. False is a boolean value, so with most likeliness the element data "missionz" is not set properly(or simply does not exist). Unless you post the relevant code as to how it is set, we can't really help you further.

Edited by Dealman
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...