• 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!

(support) npcHandler:say -- variable

Joined
Jul 25, 2007
Messages
382
Reaction score
38
Below isn't working, so I'm just curious how do I allow them to retrieve text from a variable?

LUA:
city_name = "CITY"
npcHandler:say("I'm the official banker of".. city_name .."!", cid)
 
try like;
Code:
npcHandler:say("I'm the official banker of " .. string.format(city_name) .. ".", cid)
it should work the way you did it anyway
 
Last edited:
>escaping ' where it's not needed
>calling string.format without parameters
Code:
function onSay(cid, words, param, channel)
	return doPlayerSendTextMessage(cid, 20, string.format("testetetet.") .. "")
end
-
Code:
13:42 !test
13:42 testetetet.
pwnt ;d
 
thats why im just saying 'try' because the whole npc system is based on strings ;s
-edit: ops i gotcha, sry
 
Last edited:
Back
Top