Y_ini errors/warnings +Rep
#1

Script
Код:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //line 518
	}
	else
	{
 		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COLOR_WHITE"Registering...",""COLOR_WHITE"Type your password below to register a new account.","Register","Quit"); //Line 522
	}

	return 1;
}
errors
Код:
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(518) : warning 215: expression has no effect
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : warning 215: expression has no effect
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : warning 215: expression has no effect
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : error 001: expected token: ";", but found "-string-"
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#2

try this code:
Код:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //line 518
	}
	else
	{
 		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //Line 522
	}

	return 1;
}
Reply
#3

You used "COLOR_WHITE" which is defined an an integer. Color embedding is meant to be strings like:
pawn Код:
#define COL_WHITE "{FFFFFF}"
and then
pawn Код:
""COL_WHITE"Some Text"
or you can even replace them manually with {RRGGBB}.
Reply
#4

Quote:
Originally Posted by Dusan01
Посмотреть сообщение
try this code:
Код:
public OnPlayerConnect(playerid)
{
	if(fexist(UserPath(playerid)))
	{
		INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //line 518
	}
	else
	{
 		ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,"{FFFFFF}Registering...","{FFFFFF}Type your password below to register a new account.","Register","Quit"); //Line 522
	}

	return 1;
}
Thx all the errors r solved but 2 warnings .....

Код:
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(518) : warning 215: expression has no effect
C:\Users\Mohamed\Desktop\samp servering\gamemodes\grandlarc.pwn(522) : warning 215: expression has no effect
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Reply
#5

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
You used "COLOR_WHITE" which is defined an an integer. Color embedding is meant to be strings like:
pawn Код:
#define COL_WHITE "{FFFFFF}"
and then
pawn Код:
""COL_WHITE"Some Text"
or you can even replace them manually with {RRGGBB}.
#define COLOR_WHITE 0xFFFFFFAA , thats what COLOR_WHITE is defined
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)