SA-MP Forums Archive
Freaking error -_- [PLEASE HELP] - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Freaking error -_- [PLEASE HELP] (/showthread.php?tid=361133)



How to Make it Into a DIALOG [HELP IMMEDIATLY] - [Cali]ChrOnic_T - 20.07.2012

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"


Re: Freaking error -_- [PLEASE HELP] - [KHK]Khalid - 20.07.2012

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


Re : Freaking error -_- [PLEASE HELP] - JakeMiller - 20.07.2012

is the problem with "50" ?


Re: Freaking error -_- [PLEASE HELP] - Roperr - 20.07.2012

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.


Re: Freaking error -_- [PLEASE HELP] - [KHK]Khalid - 20.07.2012

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", "");



Re: Freaking error -_- [PLEASE HELP] - Roperr - 20.07.2012

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.