Jump to content

attemt to call local v (userdata value)


Dretax

Recommended Posts

local match = false
for k, v in ipairs(getElementsByType("pickup")) do
	if (getElementData(v, "ing.id") and tonumber(getElementData(v, "ing.id")) == id) then
		match = v
		break
	end
end

if match then
	setElementData(match "ing.own", specid)
end

Match is an element, has all the properties, and giving it a good value.

Somehow setlelementdata fails, why?

Link to comment
  • 7 months later...

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...