Reloac
BETA Tester
Hey, I've been trying to work out how to output the data from a SQL Query (Magic Gold) to a menu item , if i have 20,000 MG, it would say "Collection > 20000 Magic Gold" - i tried adding %u to the title, to output the query result.. and adding CurrentMagicGold to the side, but errors so i have no clue :/
Code:
case GOSSIP_ACTION_INFO_DEF + 12:
{
QueryResult result = LoginDatabase.PQuery("SELECT magic_gold FROM account WHERE id='%u'", player->GetSession()->GetAccountId());
if (!result)
return;
Field* fields = result->Fetch();
uint32 currentMagicGold = fields[0].GetUInt32();
player->ADD_GOSSIP_ITEM(0, "|Tinterface\\icons\\inv_misc_beer_04:30|t Magic Gold Current : %u ", CurrentMagicGold, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 20);
}
break;
Last edited: