x86 Posted August 24, 2008 Posted August 24, 2008 Hi, This is my script for a house system (SQL) onResourceStart()..... while ... do createPickup(house["x"], house["y"], house["z"], 3, 1272, 2000) end --------------------------------------- function HuisjesPickup() outputChatBox(source) cancelEvent() end addEventHandler("onPlayerPickupUse", root, HuisjesPickup) And the error: ERROR: ...A/mods/deathmatch/resourcecache/greenhood/server.lua:370: attempt to concatenate global 'source' (a userdata value) Can you help me? Thank you.
Ace_Gambit Posted August 24, 2008 Posted August 24, 2008 You can't output a player element to a chat box.
Gamesnert Posted August 24, 2008 Posted August 24, 2008 Hi,This is my script for a house system (SQL) onResourceStart()..... while ... do createPickup(house["x"], house["y"], house["z"], 3, 1272, 2000) end --------------------------------------- function HuisjesPickup() outputChatBox(source) cancelEvent() end addEventHandler("onPlayerPickupUse", root, HuisjesPickup) And the error: ERROR: ...A/mods/deathmatch/resourcecache/greenhood/server.lua:370: attempt to concatenate global 'source' (a userdata value) Can you help me? Thank you. outputChatBox(getClientName(source))
DiSaMe Posted August 24, 2008 Posted August 24, 2008 You can't output a player element to a chat box. But why isn't this possible? All elements have their numerical IDs, right?
Ace_Gambit Posted August 24, 2008 Posted August 24, 2008 You can't output a player element to a chat box. But why isn't this possible? All elements have their numerical IDs, right? Possibly because the function is expecting a string object and not an element object structure. And an element does not have a numeric id by default as far as I know.
haybail Posted August 25, 2008 Posted August 25, 2008 It has something, not sure what it is. But when you use tostring it has some sort of id.
Ace_Gambit Posted August 25, 2008 Posted August 25, 2008 It has something, not sure what it is. But when you use tostring it has some sort of id. That random number is a memory address.
x86 Posted August 26, 2008 Author Posted August 26, 2008 You can't output a player element to a chat box. source = pickup id ?
Simbad de Zeeman Posted August 26, 2008 Posted August 26, 2008 From wiki: The source of this event is the player that is standing on a pickup.
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