Freaking error -_- [PLEASE HELP]
#1

How to make this

Код:
    new tmp3[50];
    GetPlayerIp(playerid,tmp3,50);
    format( string, sizeof( string ),"Your IP Addres: %s",tmp3 );
Into a dialog Please Help i will +Reputation you.

I been trying to found out how to do this but its hard.

Like i need to make it say "Your Ip Address: %s"
"Close"
Reply
#2

Can you show the lines below/above these lines? Because it compiles fine right here for me.
Reply
#3

is the problem with "50" ?
Reply
#4

pawn Код:
new tmp3[50];
GetPlayerIp(playerid,tmp3,50);
format(string, sizeof(string),"Your IP address is: %s",tmp3);
ShowPlayerDialog(playerid, 3553, DIALOG_STYLE_MSGBOX, "IP", string, "Close", "");
Note: the number 3553 is the dialog id. Max dialogid is 32767.
Reply
#5

Quote:
Originally Posted by Roperr
Посмотреть сообщение
pawn Код:
new tmp3[50];
GetPlayerIp(playerid,tmp3,50);
format(string, sizeof(string),"Your IP address is: %s",tmp3);
ShowPlayerDialog(playerid, 3553, DIALOG_STYLE_MSGBOX, "IP", string, "Close", "");
Note: the number 3553 is the dialog id. Max dialogid is 32767.
That would give an error undefined symbol string.


pawn Код:
new ip[64], string[128];
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string), "Your IP Address is: %s", ip);
ShowPlayerDialog(playerid, 1, DIALOIG_STYLE_MSGBOX, "IP Info", string, "Ok", "");
Reply
#6

Quote:
Originally Posted by HellSphinX
Посмотреть сообщение
That would give an error undefined symbol string.


pawn Код:
new ip[64], string[128];
GetPlayerIp(playerid, ip, sizeof(ip));
format(string, sizeof(string), "Your IP Address is: %s", ip);
ShowPlayerDialog(playerid, 1, DIALOIG_STYLE_MSGBOX, "IP Info", string, "Ok", "");
As you probably noticed, he only gave us a part of the code, meaning he already has string defined somewhere, probably on the top of the gamemode... All he asked for was to make it appear in a dialog.

Also I suggest an unique dialog that you don't use anywhere. So I hope 1 is not used, lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)