SA-MP Forums Archive
Email dialog error,help pls - 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: Email dialog error,help pls (/showthread.php?tid=540675)



Email dialog error,help pls - TiXz0r - 06.10.2014

ERRORS
Code:
(1503) : error 014: invalid statement; not in switch
(1503) : warning 215: expression has no effect
(1503) : error 001: expected token: ";", but found ":"
(1503) : error 029: invalid expression, assumed zero
(1503) : fatal error 107: too many error messages on one line
PART OF SCRIPT:
Code:
        case DIALOG_EMAIL: //1503 LINE
        {
			if(response)
            {
                new email, message[64];
                {
                     ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_ORANGE"EMAIL","Unesite vas email","Uredu","");
                }
                else
                {
                     ClearText(playerid);
                     PlayerInfo[playerid][pEmail] = email;
                     format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
                }
			}
        }
I HAVE:
Code:
#define DIALOG_EMAIL 6



Re: Email dialog error,help pls - Eth - 06.10.2014

try that:
pawn Code:
if(dialogid ==  DIALOG_EMAIL)//1503 LINE
        {
            if(response)
            {
                new email, message[64];
                {
                     ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_ORANGE"EMAIL","Unesite vas email","Uredu","");
                }
                else
                {
                     ClearText(playerid);
                     PlayerInfo[playerid][pEmail] = email;
                     format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
                }
            }
        }



Re: Email dialog error,help pls - TiXz0r - 06.10.2014

Quote:
Originally Posted by Eth
View Post
try that:
pawn Code:
if(dialogid ==  DIALOG_EMAIL)//1503 LINE
        {
            if(response)
            {
                new email, message[64];
                {
                     ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_ORANGE"EMAIL","Unesite vas email","Uredu","");
                }
                else
                {
                     ClearText(playerid);
                     PlayerInfo[playerid][pEmail] = email;
                     format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
                }
            }
        }
Im fixed but have new problem xD

Code:
        case DIALOG_EMAIL:
        {
			if(response)
            {
                new email, message[64];
                {
                     ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT,""COL_ORANGE"EMAIL","Unesite vas email","Uredu","");
                }
                {
                     ClearText(playerid);
                     PlayerInfo[playerid][pEmail] = email;
                     format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
                     ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT,""COL_ORANGE"GODINE","Koliko imate godina?","Dalje","");
                }
			}
        }
When enter email and say: your email is :0, not saying email@mail.com :S


Re: Email dialog error,help pls - Eth - 06.10.2014

change
pawn Code:
new email, message[64];
to
pawn Code:
new email[64], message[64];
and this:
pawn Code:
format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
to:
pawn Code:
format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %s.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);



Re: Email dialog error,help pls - TiXz0r - 06.10.2014

Thank you man respect +


Re: Email dialog error,help pls - TiXz0r - 06.10.2014

Quote:
Originally Posted by Eth
View Post
change
pawn Code:
new email, message[64];
to
pawn Code:
new email[64], message[64];
and this:
pawn Code:
format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %d.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
to:
pawn Code:
format(message, sizeof(message), ""COL_ORANGE"SERVER: "COL_WHITE"U redu,vas email: %s.", email);
                     SendClientMessage(playerid, 0xFFFFFFFF, message);
Code:
 error 006: must be assigned to an array
line
Code:
PlayerInfo[playerid][pEmail] = email;



Re: Email dialog error,help pls - Eth - 06.10.2014

change pEmail to pEmail[68]


Re: Email dialog error,help pls - TiXz0r - 06.10.2014

Quote:
Originally Posted by Eth
View Post
change pEmail to pEmail[68]
Code:
(1414) : error 028: invalid subscript (not an array or too many subscripts): "pEmail"
(1414) : warning 215: expression has no effect
(1414) : error 001: expected token: ";", but found "]"
(1414) : error 029: invalid expression, assumed zero
(1414) : fatal error 107: too many error messages on one line
im try 64 and 68


Re: Email dialog error,help pls - zaibaslr2 - 06.10.2014

Quote:

PlayerInfo[playerid][pEmail] = email;

You can't use it like that.
format(PlayerInfo[playerid][pEmail],sizeof(PlayerInfo[playerid][pEmail]),"%s",email);


Re: Email dialog error,help pls - TiXz0r - 06.10.2014

Quote:
Originally Posted by zaibaslr2
View Post
You can't use it like that.
format(PlayerInfo[playerid][pEmail],sizeof(PlayerInfo[playerid][pEmail]),"%s",email);
errors :S