PDA

View Full Version : [HELP] I have error messages i cant fix.. :( - +Rep


Oscii
28/04/2012, 09:19 PM
Hello.

Pawno Code.

ShowMainMenuDialog(playerid, frame)
{
new titlestring[64];
new string[256];

switch(frame)
{
case 1;
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{228B22}Welcome to Priority Roleplay, %s.\n\nThis Account Is Registered Please Fill In Your Password To Login In.{228B22}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit";) <-- Error Line!
}
case 2;
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Register - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{1E90FF}Welcome to Priority Roleplay, %s.\n\nYou Have Not Yet Registered Please Do And Fill Out The Password.{1E90FF}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_P ASSWORD,titlestring,string,"Register","Exit";)
};
case 3;
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{1E90FF}Invalid Password!\n\nWelcome to Priority Roleplay, %s.\n\nThis Account Is Registered Please Fill In Your Password To Login In{1E90FF}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit";)
}
}
}

Error Codes:


(9823) : error 001: expected token: "-string end-", but found "-identifier-"
(9823) : error 029: invalid expression, assumed zero
(9823) : error 029: invalid expression, assumed zero
(9823) : fatal error 107: too many error messages on one line

The DeLuca
28/04/2012, 09:24 PM
You do have ); at the end of it after "Exit" right?

Oscii
28/04/2012, 09:25 PM
You do have ); at the end of it after "Exit" right?

Ofcourse i do :P

Danny1
28/04/2012, 09:30 PM
Hmm let's try this :

new titlestring[64], string[256];
switch(frame)
{
case 1:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring)), "Login - %s", GetPlayerNameEx(playerid);
format(string, sizeof(string)), "{228B22}Welcome to Priority Roleplay, %s.\n\nThis Account Is Registered Please Fill In Your Password To Login In.{228B22}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit");
}

Oscii
28/04/2012, 09:36 PM
I still get these errors.. :(

(9823) : error 001: expected token: "-string end-", but found "-identifier-"
(9823) : error 029: invalid expression, assumed zero
(9823) : error 029: invalid expression, assumed zero
(9823) : fatal error 107: too many error messages on one line

Danny1
28/04/2012, 09:43 PM
Omg,look you put here ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit";) <-- Error Line!

It must be like this : ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit"); <-- Error Line!

First ) then ;

Oscii
28/04/2012, 09:48 PM
erm.. now i have 19 errors..

Danny1
28/04/2012, 09:53 PM
Every line in you have ; ) this replace with ); or post that errors and lines in which called errors.

DreamOnIt
28/04/2012, 09:55 PM
There are some syntax errors, check your code...

case 3; -> Its ":" not ";"

ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit"; )

ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_P ASSWORD,titlestring,string,"Register","Exit"; )

When you code something, try to pay attention to what you are writing

Oscii
28/04/2012, 10:23 PM
Thank you very much!

Fixed.

+1 Rep for all that have made a reply.

sniperwars
30/04/2012, 07:02 PM
ShowMainMenuDialog(playerid, frame)
{
new titlestring[64];
new string[256];

switch(frame)
{
case 1:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{228B22}Welcome to Priority Roleplay, %s.\n\nThis Account Is Registered Please Fill In Your Password To Login In.{228B22}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit");
}
case 2:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Register - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{1E90FF}Welcome to Priority Roleplay, %s.\n\nYou Have Not Yet Registered Please Do And Fill Out The Password.{1E90FF}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU2,DIALOG_STYLE_P ASSWORD,titlestring,string,"Register","Exit");
}
case 3:
{
new ip[32];
GetPlayerIp(playerid, ip, 32);
format(titlestring, sizeof(titlestring), "Login - %s", GetPlayerNameEx(playerid));
format(string, sizeof(string), "{1E90FF}Invalid Password!\n\nWelcome to Priority Roleplay, %s.\n\nThis Account Is Registered Please Fill In Your Password To Login In{1E90FF}", GetPlayerNameEx(playerid), ip);
ShowPlayerDialog(playerid,MAINMENU,DIALOG_STYLE_PA SSWORD,titlestring,string,"Login","Exit");
}
}
}