yukitokun1996 Posted October 8, 2016 Share Posted October 8, 2016 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
Dealman Posted October 8, 2016 Share Posted October 8, 2016 (edited) 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 October 8, 2016 by Dealman Link to comment
yukitokun1996 Posted October 8, 2016 Author Share Posted October 8, 2016 thanks , my data does not exits and i'm fixed Link to comment
Apo Posted October 8, 2016 Share Posted October 8, 2016 you need (killer, "missionz") setelemntdata for (killer, "missionz") Link to comment
yukitokun1996 Posted October 8, 2016 Author Share Posted October 8, 2016 12 hours ago, Apo said: you need (killer, "missionz") setelemntdata for (killer, "missionz") ok, thanks Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now