Run time error
#1

pawn Код:
new spectator = GettingSpectated[playerid];
        if(PlayerInfo[spectator][pAdmin] >= 2) {
            // Preventing possible buffer overflows with the arrays
            TogglePlayerSpectating(spectator, true);
            PlayerSpectatePlayer( spectator, playerid );
            SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
            SetPVarInt(spectator, "SpecState", newstate);
            SetPlayerInterior( spectator, GetPlayerInterior( playerid ) );
            SetPlayerVirtualWorld( spectator, GetPlayerVirtualWorld( playerid ) );
        }
Reply
#2

IIRC INVALID_PLAYER_ID is 0xFFFF, so I guess:
1. new spectator = GettingSpectated[playerid];

Now you have INVALID_PLAYER_ID, and you are using it anyway. Do something like
pawn Код:
if(spectator != INVALID_PLAYER_ID && PlayerInfo[spectator][pAdmin] >= 2) {
Reply
#3

Quote:
Originally Posted by Misiur
Посмотреть сообщение
IIRC INVALID_PLAYER_ID is 0xFFFF, so I guess:
1. new spectator = GettingSpectated[playerid];

Now you have INVALID_PLAYER_ID, and you are using it anyway. Do something like
pawn Код:
if(spectator != INVALID_PLAYER_ID && PlayerInfo[spectator][pAdmin] >= 2) {
I'll try it. Thanks.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)