Public function crashes server.
#1

Hey! I created public function to call it from diffrent scripts with CallRemoteFunction, but when it is called it crashes server:
pawn Код:
public SpecPlayer(playerid,specid){
        if(Spawned[specid]==false) return SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: This player is not spawned.");
        SetPlayerInterior(playerid,GetPlayerInterior(specid));
        TogglePlayerSpectating(playerid, 1);
        if(!IsPlayerInAnyVehicle(specid))
        {
        PlayerSpectatePlayer(playerid, specid, SPECTATE_MODE_NORMAL);
        }
        if(IsPlayerInAnyVehicle(specid))
        {
        PlayerSpectateVehicle(playerid, GetPlayerVehicleID(specid), SPECTATE_MODE_NORMAL);
        }
        GetPlayerName(specid, incriminato, sizeof(incriminato)),GetPlayerName(playerid, adminname, sizeof(adminname));
        format(string, sizeof(string), "{00ff00}You're spectating {ffffff}%s", incriminato), SendClientMessage(playerid, COLOR_ZADMINBLUE, string);
        format(string, sizeof(string), "{ffffff}%s {00ff00}is spectating you", adminname), SendClientMessage(specid, COLOR_ZADMINBLUE, string);
        return 1;
        }
there is nothing written about crash in server log. What can it be?
Reply


Messages In This Thread
Public function crashes server. - by pasha97 - 01.07.2012, 15:34
Re: Public function crashes server. - by MadeMan - 01.07.2012, 15:56
Re: Public function crashes server. - by pasha97 - 01.07.2012, 16:03
Re: Public function crashes server. - by MadeMan - 01.07.2012, 16:07
Re: Public function crashes server. - by pasha97 - 01.07.2012, 16:09

Forum Jump:


Users browsing this thread: 1 Guest(s)