Email dialog error,help pls
#1

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
Reply
#2

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);
                }
            }
        }
Reply
#3

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
Reply
#4

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);
Reply
#5

Thank you man respect +
Reply
#6

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;
Reply
#7

change pEmail to pEmail[68]
Reply
#8

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
Reply
#9

Quote:

PlayerInfo[playerid][pEmail] = email;

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

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)