String error
#1

Hi, i don't get it why this happens:
http://i53.tinypic.com/2woj7o7.png
In English:
"telefono numeris" = phone number
"Gaujos ID" = gang id
"Gaujos pavadinimas" = gang name
pawn Код:
new msg[300];
                new telnr,xp, gid;
                xp = GetPlayerScore(playerid);
                telnr = player[playerid][number];
                gid = gplayerDB[playerid][gangid];
                format(msg, 300, "Telefono numeris: %i\nExp: %i\nGaujos Id: %i\nGaujos pavadinimas: %d",telnr,xp, gid,gangDB[gid][gvardas]);
                ShowPlayerDialog(playerid,12,DIALOG_STYLE_MSGBOX,"Informacija apie tave",msg,"Ok","Atgal");
Anyone can help me?
Reply
#2

Analyzing the code and SS, everything's okay.. What's wrong with it?
Reply
#3

What exactly happens?
Reply
#4

last line in msgbox should show gang name after " : " but as u see its number
P.S. I know what name is existing..I check it with another cmd
Reply
#5

Ah, it's littile mistake

Replace
Код:
format(msg, 300, "Telefono numeris: %i\nExp: %i\nGaujos Id: %i\nGaujos pavadinimas: %d",telnr,xp, gid,gangDB[gid][gvardas]);
instead of
Код:
format(msg, 300, "Telefono numeris: %i\nExp: %i\nGaujos Id: %i\nGaujos pavadinimas: %s",telnr,xp, gid,gangDB[gid][gvardas]);
The mistake was here: Gaujos pavadinimas: %d
%d is for numerical things (eg ID)
%s is for strings (name, localization, city, etc)
Reply
#6

thx man, it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)