this code crashes server ( segmentation fault)
#1

This code crashes the server, but it didnt crash before!!
pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(VehicleInfo[vehicleid][Owned] == 1) {
        new PlayerName[24];
        GetPlayerName(playerid, PlayerName, 24);
        if(strcmp(VehicleInfo[vehicleid][vOwner], PlayerName, true ) != 0 && ispassenger == 0) {
            SendClientMessage(playerid, COLOR_LIGHTRED, LoadText(playerid, "NOT_OWN"));
            SendClientMessage(playerid, COLOR_LIGHTRED, LoadText(playerid, "NOT_OWN2"));
            ClearAnimations(playerid);
            return 1;
        }
    }
    return 1;
}
Reply
#2

I have had a lot of bad experiences with global variables, check if they are set correctly.
Reply
#3

Fixed, i forgot to format the message
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)