E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(750) : warning 211: possibly unintended assignment
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
COMMAND:Ranks(playerid, params[])
{
#pragma unused params
if(GetPlayerScore(playerid = 0)) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Newbie");
return 1;
}
COMMAND:Ranks(playerid, params[])
{
#pragma unused params
if(GetPlayerScore(playerid) == 0) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Newbie");
return 1;
}
You're using the getplayerfunction wrong, and the "equal" operator would be == see - https://sampwiki.blast.hk/wiki/Control_Structures#Operators
pawn Код:
|
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(751) : warning 209: function "cmd_Ranks" should return a value
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(752) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(754) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(756) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(758) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(760) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(762) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(764) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(766) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(768) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(770) : error 010: invalid function or declaration
E:\GTA - San Andreas\Pawno Scripting\gamemodes\Script.pwn(772) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
11 Errors.
COMMAND:Ranks(playerid, params[])
{
#pragma unused params
if(GetPlayerScore(playerid) == 0) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Newbie");
}
else if
{
if(GetPlayerScore(playerid) == 100) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Killa");
}
else if
{
if(GetPlayerScore(playerid) == 200) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Young Gangsta");
}
else if
{
if(GetPlayerScore(playerid) == 300) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Mobsta");
}
else if
{
if(GetPlayerScore(playerid) == 500) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Gangsta");
}
else if
{
if(GetPlayerScore(playerid) == 900) return SendClientMessage(playerid, COLOR_PINK, "Your Rank is Boss");
}
return 1;
}