SERVER UNKNOWN COMMAND, but command works
#7

pawn Код:
new kojagaraza = GarazaID(playerid);
if (kojagaraza != 9999) {
    if (HouseInfo[kojagaraza][hImagarazu] == 0) return 1;
    if (HouseInfo[kojagaraza][hGarazaZakljucana] == 1 && Igrac[playerid][pKuca] != kojagaraza) {
        SendClientMessage(playerid, COLOR_GREY, "{FF0000}Garaza zakljucana.");
        return 1;
    }
    if (GetPlayerState(playerid) == 2) {
        Portan[playerid] = 4;
        SetPlayerVirtualWorld(playerid, kojagaraza);
        SetVehicleVirtualWorld(GetPlayerVehicleID(playerid), kojagaraza);
        SetVehiclePos(GetPlayerVehicleID(playerid), 1373.6763, -38.0756, 1001.0511);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.7881);
        hGarazaEntered[playerid] = kojagaraza;
    } else if (GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) {
        SetPlayerVirtualWorld(playerid, kojagaraza);
        AC_SetPlayerPos(playerid, 1373.6763, -38.0756, 1001.0511);
        hGarazaEntered[playerid] = kojagaraza;
    }
    return 1;
}
If GarazaID function returns any other value to indicate invalid instead of 9999, it can give run time error 4: array index out of bounds error.

Install crashdetect plugin (https://github.com/Zeex/samp-plugin-...etect/releases)
Set -d3 flag (https://github.com/Zeex/samp-plugin-...ith-debug-info)
Compile your script again.
Start the server, execute the command and post the server log if it gave unknown command.
Reply


Messages In This Thread
SERVER UNKNOWN COMMAND, but command works - by majmunko - 16.09.2018, 19:37
Re: SERVER UNKNOWN COMMAND, but command works - by Jing_Chan - 16.09.2018, 20:24
Re: SERVER UNKNOWN COMMAND, but command works - by KinderClans - 16.09.2018, 20:38
Re: SERVER UNKNOWN COMMAND, but command works - by majmunko - 17.09.2018, 20:30
Re: SERVER UNKNOWN COMMAND, but command works - by Grim_ - 17.09.2018, 21:16
Re: SERVER UNKNOWN COMMAND, but command works - by majmunko - 19.09.2018, 01:07
Re: SERVER UNKNOWN COMMAND, but command works - by Calisthenics - 19.09.2018, 08:39
Re: SERVER UNKNOWN COMMAND, but command works - by TitoRayne - 19.09.2018, 09:02

Forum Jump:


Users browsing this thread: 1 Guest(s)