• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

[SOLVED] string.format

Status
Not open for further replies.

mjafko

Epic Member
Hellou. Seems like I have another problem.
What Am I doing wrong here ?
player:GossipMenuAddItem won't show me name which str have it.

Code:
local name = CharDBQuery("SELECT * FROM aa_mjafko_test1 WHERE Player = 3")
	local str = name:GetString(0)
		player:SendBroadcastMessage(str) -- this one working!
		player:GossipMenuAddItem(0, string.format("|TINTERFACE/ICONS/Achievement_arena_3v3_7:35|t |r|cffF02F2F Player : ",str) , 0, 2)
 

Tommy

Founder
Because you don't have string.format expecting the string.

Example:

I replaced "Player" with %s for the player's name.
Code:
string.format("|TINTERFACE/ICONS/Achievement_arena_3v3_7:35|t |r|cffF02F2F %s : ", str)

Another example:

Code:
string.format("Hello, I'm expecting a %s", "string")
 
Status
Not open for further replies.
Top