Hello,
Trying to create (what I thought) was a simple talkaction script that players could use to get info about their houses. Here is what I have:
I was getting errors about concatenating userdata, so that is why I have the prints in the script. The "rent" variable is assigned to the correct number, 220, but the data assigned to the local "house" and "town" variables are not strings of the house name or town name, but memory locations. The print is this:
My question is, how do I get this to print out a string instead of data?
Trying to create (what I thought) was a simple talkaction script that players could use to get info about their houses. Here is what I have:
Lua:
function onSay(player, words, param)
if player:getHouse() == nil then
player:sendCancelMessage("You do not currently own a house.")
return false
end
local house = player:getHouse()
local town = house:getTown(house)
local rent = house:getRent(house)
print(house)
print(town)
print(rent)
player:sendTextMessage(MESSAGE_INFO_DESCR, house ..'\n'.. town ..'\n'.. rent)
return true
end
I was getting errors about concatenating userdata, so that is why I have the prints in the script. The "rent" variable is assigned to the correct number, 220, but the data assigned to the local "house" and "town" variables are not strings of the house name or town name, but memory locations. The print is this:
Code:
userdata: 0x402bc058
userdata: 0x402bc980
220
My question is, how do I get this to print out a string instead of data?