• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X how to obtain a town value from query?

5lave Ots

Active Member
Joined
Oct 2, 2017
Messages
246
Solutions
1
Reaction score
40
Location
Ankrahmun
somebody asked for an offline reward talkaction that im working on
and i need to define a player.town id from the query

Lua:
player = db.getResult('SELECT `name`, `town_id` FROM `players` WHERE `name` = "' .. par[1] .. '";')
how to define a local variable ' town_id' from that query?
shall i use player.town_id?

to return me that line
Code:
doPlayerSendMailByName(par[1], chest, town_id)
Post automatically merged:

somebody asked for an offline reward talkaction that im working on
and i need to define a player.town id from the query

Lua:
player = db.getResult('SELECT `name`, `town_id` FROM `players` WHERE `name` = "' .. par[1] .. '";')
how to define a local variable ' town_id' from that query?
shall i use player.town_id?

to return me that line
Code:
doPlayerSendMailByName(par[1], chest, town_id)
its solved but i cant delete the post
using player.town_id was the answer
 
Back
Top