Need some help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need some help (
/showthread.php?tid=248407)
Need some help -
jonnyboy - 13.04.2011
ERROR
Код:
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(238) : warning 202: number of arguments does not match definition
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1256) : error 021: symbol already defined: "SetPlayerColor"
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1258) : error 010: invalid function or declaration
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1262) : error 010: invalid function or declaration
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1266) : error 010: invalid function or declaration
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1272) : error 021: symbol already defined: "SetPlayerTeam"
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1274) : error 010: invalid function or declaration
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1275) : error 010: invalid function or declaration
D:\Rockstar Games\SAMP SERVER\gamemodes\gm.pwn(1276) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
8 Errors.
LINES
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerInterior(playerid,0);
SetPlayerColor(playerid);
if(pTeam[playerid] == TEAM_ADMIN)
{
if(PlayerInfo[playerid][AdminLevel] < 1) return SendClientMessage(playerid, COLOR_RED, "You are not an admin!");
SendClientMessage(playerid,COLOR_RED, "Welcome admin!");
}
else if(pTeam[playerid] == TEAM_COP)
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"You are a cop! make sure no player cheat.");
}
else if(pTeam[playerid] == TEAM_PLAYER)
{
SendClientMessage(playerid,COLOR_WHITE,"Have fun!");
}
return 1;
}
pawn Код:
SetPlayerColor(playerid)
{
if(pTeam[playerid] == TEAM_ADMIN)
{
SetPlayerColor(playerid,COLOR_GREEN);
}
else if(gTeam[playerid] == TEAM_COP)
{
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
}
else if(pTeam[playerid] == TEAM_PLAYER)
{
SetPlayerColor(playerid,COLOR_WHITE);
}
}
SetPlayerTeam(playerid, classid)
{
if(classid >= 0 && classid <= 7) = TEAM_PLAYER;
if(classid >= 8 && classid <= 12) = TEAM_COP;
if(classid >= 13 && classid <= 15) = TEAM_ADMIN;
}
help?
Re: Need some help -
jonnyboy - 13.04.2011
there is just one SetPlayerColor(playerid) and a few SetPlayerColor(playerid,<colour>);
(<colour> = the colours)
the same thing on SetPlayerTeam
Re: Need some help -
[DJ]Boki - 13.04.2011
"invalid function or declaration" delete 'em all