if(RespawnDisabled = true)
{
new str[128];
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
IsPlayerSpectating[playerid] = true;
format(str, 128, "~n~~n~~n~~n~~n~~n~~n~~n~~g~Spectating: ~w~%s(ID:%d)", GetName(SpectatedPlayer[playerid]), SpectatedPlayer[playerid]);
GameTextForPlayer(playerid,str,10000,3);
}
error 076: syntax error in the expression, or invalid function call
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
if(RespawnDisabled == true)
{
new str[128];
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
IsPlayerSpectating[playerid] = true;
format(str, 128, "~n~~n~~n~~n~~n~~n~~n~~n~~g~Spectating: ~w~%s(ID:%d)", GetName(SpectatedPlayer[playerid]), SpectatedPlayer[playerid]);
GameTextForPlayer(playerid,str,10000,3);
}
error 076: syntax error in the expression, or invalid function call
#define RespawnDisabled true
new bool:RespawnDisabled;
Ok, so is the "RespawnDisabled" define or bool?
Is it this: pawn Код:
pawn Код:
|
if(bool:RespawnDisabled == true)
{
new str[128];
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
IsPlayerSpectating[playerid] = true;
format(str, 128, "~n~~n~~n~~n~~n~~n~~n~~n~~g~Spectating: ~w~%s(ID:%d)", GetName(SpectatedPlayer[playerid]), SpectatedPlayer[playerid]);
GameTextForPlayer(playerid,str,10000,3);
}
Try this:
pawn Код:
|
IsPlayerSpectating[playerid] = true;
Show me where you define this:
pawn Код:
|
new bool:IsPlayerSpectating[MAX_PLAYERS];
//replace your current bools
new bool:IsPlayerSpectating[MAX_PLAYERS] = false;
new bool:RespawnDisabled = true;
if(bool:RespawnDisabled == true)
{
new str[128];
TogglePlayerSpectating(playerid, 1);
PlayerSpectatePlayer(playerid, killerid);
IsPlayerSpectating[playerid] = true; //this line could cause the error
//OR\\
bool:IsPlayerSpectating[playerid] = true; //dont use both lines, just comment one
format(str, 128, "~n~~n~~n~~n~~n~~n~~n~~n~~g~Spectating: ~w~%s(ID:%d)", GetName(SpectatedPlayer[playerid]), SpectatedPlayer[playerid]);
GameTextForPlayer(playerid,str,10000,3);
}
if(bool:RespawnDisabled == true)
Just dont do this, it makes no sense. Show us the code before that if statement. |