Unable +rep - 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: Unable +rep (
/showthread.php?tid=539773)
Unable +rep -
ManGoe - 30.09.2014
pawn Код:
public DisplayDialogForPlayer(playerid, dialogid)
{
switch(dialogid)
{
case 1:
{
[B][I]ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Hello, Welcome to The Life of Flying We have found you are registered.\n\n[Username]: {FF9900}%s{FFFFFF} - [IP]: {FF9900}%s{FFFFFF}\n\nPlease enter your password below to login.", username(playerid), ip,"Login","Quit");[/I][/B]
}
E:\Main\Life of Flying 0.3x (1)\Life of Flying 0.3x\gamemodes\LoF.pwn(16625) : error 017: undefined symbol "username"
Re: Unable +rep -
Ox1gEN - 30.09.2014
You can't have a formatted message inside ShowPlayerDialog, you need to use format.
Plus the error is self explanatory..
The symbol aka (var or smth else) doesn't exist, therefore it is undefined.
Make sure you have a var called username.
Re: Unable +rep -
YanLanger - 30.09.2014
Please use [pawn ]Your code/error[/pawn ]
Re: Unable +rep -
YanLanger - 30.09.2014
Try this
pawn Код:
forward DisplayDialogForPlayer(playerid,dialogid);
public DisplayDialogForPlayer(playerid, dialogid)
{
switch(dialogid)
{
case 0:
{
ShowPlayerDialog(playerid, 1,DIALOG_STYLE_PASSWORD, "{FFFFFF}Hello, Welcome to The Life of Flying We have found you are registered.\r\n[USERNAME]: {FF9900}%s{FFFFFF} - [IP]: {FF9900}%s{FFFFFF}\r\nPlease enter your password below to login.",playerid, ip,"Login","Quit");
return 1;
}
}
return 1;
}
Re : Unable +rep -
DaTa[X] - 30.09.2014
pawn Код:
public DisplayDialogForPlayer(playerid, dialogid)
{
switch(dialogid)
{
new string[256];
case 1:
{
format(string,sizeof(string),"Welcome to The Life of Flying We have found you are registered.\n\n[Username]: {FF9900}%s{FFFFFF} - [IP]: {FF9900}%s{FFFFFF}\n\nPlease enter your password below to login.",username(playerid), ip)
ShowPlayerDialog(playerid,1,DIALOG_STYLE_PASSWORD,"{FFFFFF}Hello", string,"Login","Quit");
}