elfetoperez Posted August 16, 2015 Share Posted August 16, 2015 Help Fix ¡????? Minigunsystem\sv_upgrades.lua:72: Bad argument @ 'getElementData' [Expected element at argument 1, got string 'military'] Minigunsystem\sv_upgrades.lua:72: Bad argument @ 'getElementData' [Expected element at argument 1, got string 'military'] addEvent("sv_destroyWeapon", true) addEventHandler("sv_destroyWeapon", getRootElement(), function(item, loot, player) local veh = getElementData(loot,"parent") if isElement(veh) and not getElementData(veh,"vehicle") then return end if (getElementData(loot, minigun_name)or 0) - 0 then if isElement(getElementData(veh,"vehicle")) then destroyElement(getElementData(veh, "weapon2")) destroyElement(getElementData(veh, "weapon")) setElementData(veh, "weapon", false) setElementData(veh, "weapon2", false) end end end) Thanks Thanks Thanks Thanks Link to comment
JR10 Posted August 17, 2015 Share Posted August 17, 2015 'veh' is a string and not an element. I'm guessing getElementData(veh, 'vehicle') is the vehicle you want to use, so just use that instead of 'veh'. 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