Errors
#1

Код:
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(237) : error 035: argument type mismatch (argument 2)
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(238) : error 035: argument type mismatch (argument 2)
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(239) : error 035: argument type mismatch (argument 2)
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(242) : error 035: argument type mismatch (argument 2)
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(244) : error 035: argument type mismatch (argument 2)
C:\Users\ii\Desktop\New Folder (7)\gamemodes\tutorial.pwn(248) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.





Код:
CMD:makeadmin(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] >= 6 || IsPlayerAdmin(playerid)) //This is for admin 6 or bigger
	{
		new player, level, string[256]; //this we define player level and string
		if(sscanf(params, "ud", player, level)) return SendClientMessage(playerid, COL_WHITE, "/makeadmin [ID/NAME] [aLevel (1-6)]"); //This we check its all ok
		if(!IsPlayerConnected(player)) return SendClientMessage(playerid, COL_WHITE,"PlayerNotConnected"); //Ovde proveravamo dali taj ID je ili Igrac je konektiran na serveru
		if(level < 0 || level > 6) return SendClientMessage(playerid, COL_WHITE,"Admin Level ne moze biti manji od 1 i veci od 6!"); //Ovde proveravamo koji pod koji ili nad koji level nemoze da mu se postavi
		PlayerInfo[player][pAdmin] = level; //This is alevel
		format(string, sizeof(string), "Admin %s vi je postavio %d Admin Level.", pName(playerid), level); //Formating message
		SendClientMessage(player, COL_WHITE, string); //and this wrote it
		format(string, sizeof(string), "Postavili ste %s Admin Level %d.", pName(player), level); //Same thing
		SendClientMessage(playerid, COL_WHITE, string); //isti postupak kao ovo iznad
	}
	else
	{
	    SendClientMessage(playerid, COL_WHITE, "CANT USE THIS COMMAND.");
	}
	return 1;
}
Reply
#2

The problem is "COL_WHITE". I'm guessing that you using this to embed colors into text, so your #define would look like this:
pawn Код:
#define COL_WHITE "{FFFFFF}"
Whereas you need something like this:
pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
Then replace all 'COL_WHITE' with 'COLOR_WHITE'. Basically, you're using a string where you're meant to be using a hexadecimal/integer value.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)