I need help with some samp compiling errors
#1

Код:
stock PlayerPriority(playerid)
{
	new string[128];
	if(GetPVarInt(playerid, "Admin") >= 1) format(string, sizeof(string), "%s", GetPVarInt(playerid, "Admin");
	else if(GetPVarInt(playerid, "Helper") == 1) format(string, sizeof(string), "%s", GetPVarInt(playerid, "Helper");
	else if(GetPVarInt(playerid, "Helper") == 2) format(string, sizeof(string), "%s", GetPVarInt(playerid, "Admin");
	else if(GetPVarInt(playerid, "ConnectTime") <= 8 && GetPVarInt(playerid, "Admin") == 0 && GetPVarInt(playerid, "Helper") == 0) format(string, sizeof(string), "Newbie");
	else if(GetPVarInt(playerid, "ConnectTime") >= 8 && GetPVarInt(playerid, "Admin") == 0 && GetPVarInt(playerid, "Helper") == 0) format(string, sizeof(string), "Player");
	else if(GetPVarInt(playerid, "ConnectTime") >= 500 && GetPVarInt(playerid, "Admin") == 0 && GetPVarInt(playerid, "Helper") == 0) format(string, sizeof(string), "Veteran");
	else if(GetPVarInt(playerid, "ConnectTime") <= 60 && GetPVarInt(playerid, "Admin") == 0 && GetPVarInt(playerid, "Helper") == 0) format(string, sizeof(string), "Senior Player");
	return string;
}
I've tried my best to fix it to the best of my ability but I keep getting this error.
Код:
../gamemodes/Build.pwn(24623) : error 001: expected token: ",", but found ";"
../gamemodes/Build.pwn(24624) : error 001: expected token: ",", but found ";"
../gamemodes/Build.pwn(24625) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
================ READY ================
Reply
#2

You're missing ) after the getpvarint function.
PHP код:
format(stringsizeof(string), "%s"GetPVarInt(playerid"Admin"); 
->
PHP код:
format(stringsizeof(string), "%s"GetPVarInt(playerid"Admin")); 
PHP код:
if(GetPVarInt(playerid"Admin") >= 1format(stringsizeof(string), "%s"GetPVarInt(playerid"Admin"));
    else if(
GetPVarInt(playerid"Helper") == 1format(stringsizeof(string), "%s"GetPVarInt(playerid"Helper"));
    else if(
GetPVarInt(playerid"Helper") == 2format(stringsizeof(string), "%s"GetPVarInt(playerid"Admin")); 
Reply
#3

Damn, just realised. Thanks! +rep
Will try it
Reply
#4

Worked! Thanks my man. Deserved that +rep.
Admin may L&A this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)