x86 Posted August 24, 2008 Share 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. Link to comment
Ace_Gambit Posted August 24, 2008 Share Posted August 24, 2008 You can't output a player element to a chat box. Link to comment
Gamesnert Posted August 24, 2008 Share 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)) Link to comment
DiSaMe Posted August 24, 2008 Share 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? Link to comment
Ace_Gambit Posted August 24, 2008 Share 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. Link to comment
haybail Posted August 25, 2008 Share Posted August 25, 2008 It has something, not sure what it is. But when you use tostring it has some sort of id. Link to comment
Ace_Gambit Posted August 25, 2008 Share 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. Link to comment
x86 Posted August 26, 2008 Author Share Posted August 26, 2008 You can't output a player element to a chat box. source = pickup id ? Link to comment
Simbad de Zeeman Posted August 26, 2008 Share Posted August 26, 2008 From wiki: The source of this event is the player that is standing on a pickup. 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