Several of warnings and errors - again
#1

I've re-written a register & login system, I literally re-wrote everything and I still receive error messages.

Now, after fixing all the previous errors on my previous thread I receive 3 errors + fatal error due to many errors in one line.

Code:
(119) : error 001: expected token: "-string end-", but found "-identifier-"
(119) : error 029: invalid expression, assumed zero
(119) : warning 215: expression has no effect
(119) : warning 215: expression has no effect
(119) : warning 215: expression has no effect
(119) : error 001: expected token: ";", but found ")"
(119) : fatal error 107: too many error messages on one line
Here's line 119:

Code:
	    else
	    {
         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...".""COL_WHITE"Please inset a password to register.","Register","Quit");
         return 1;
		}
Here's the rest of the code:
Code:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
	    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
	    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password to login.","Login","Quit");
	    }
	    else
	    {
         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...".""COL_WHITE"Please inset a password to register.","Register","Quit");
         return 1;
		}
		return 1;
}
Reply
#2

PHP Code:
 ShowPlayerDialog(playeridDIALOG_REGISTERDIALOG_STYLE_INPUT,"{FFFFFF}Registering....Please inset a password to register.","Register","Quit"); 
Reply
#3

Quote:
Originally Posted by Kraff
View Post
I've re-written a register & login system, I literally re-wrote everything and I still receive error messages.

Now, after fixing all the previous errors on my previous thread I receive 3 errors + fatal error due to many errors in one line.

Code:
(119) : error 001: expected token: "-string end-", but found "-identifier-"
(119) : error 029: invalid expression, assumed zero
(119) : warning 215: expression has no effect
(119) : warning 215: expression has no effect
(119) : warning 215: expression has no effect
(119) : error 001: expected token: ";", but found ")"
(119) : fatal error 107: too many error messages on one line
Here's line 119:

Code:
	    else
	    {
         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...".""COL_WHITE"Please inset a password to register.","Register","Quit");
         return 1;
		}
Here's the rest of the code:
Code:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
	    INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
	    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password to login.","Login","Quit");
	    }
	    else
	    {
         ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...".""COL_WHITE"Please inset a password to register.","Register","Quit");
         return 1;
		}
		return 1;
}
I believe this is what you are looking for. Use '\n' to declare a new line. Use {} with just the colour hex inside them to colour a string ie. {FFFFFF}Hello {000000}World (colours hello white, world black). I also fixed the 'inset' spelling mistake to 'insert' for you.

Quote:

ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "{FFFFFF}Registering...\n\nPlease insert a password to register.", "Register", "Quit");

Alternatively, what you can do is:

Quote:

#define STRING_WHITE_COLOUR "{FFFFFF}"

ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""STRING_WHITE_COLOUR"Registering...\n\nPlease insert a password to register.", "Register", "Quit");

I hope this helps you in your endeavours.
Reply
#4

Just to clarify why those error were given.

COL_WHITE is defined as an integer and not as it should be (a string):
pawn Code:
#define COL_WHITE "{FFFFFF}"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)