SA-MP Forums Archive
Server Crashing Issue - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Server Crashing Issue (/showthread.php?tid=528063)



Server Crashing Issue - Jay_Dixon - 26.07.2014

Somehow, this crashes my server. Was hoping one of you know what I did wrong. I'm known to completely miss the small things xD

pawn Код:
factionsOnPlayerPickupPickup(playerid, pickupid) {
    if(pickupid == pdmetaldetector) {
        if(!IsAnLEO(playerid)) {
            new s=2,w,a;
            while(s <= 8) {
                GetPlayerWeaponData(playerid, s, w, a);
                if(w > 0 && a != 0) {
                    foreach(Player, i) {
                        if(GetPlayerInterior(i) == 10 && IsPlayerInRangeOfPoint(i, 40.0, 246.36, 107.58, 1003.21)) {
                            SendClientMessage(i, X11_TOMATO_2, " ");
                            SendClientMessage(playerid, X11_TOMATO_2, "* The metal detector beeps! *");
                        }
                        return 1;
                    }
                    s++;
                }
            }
        }
        return 1;
    }
    return 0;
}
All the functions in this thing work properly, except for the last one, which is why I've really got no clue what's going on here, also, I've never had this problem before so I haven't learned how to handle it O.O

pawn Код:
public OnPlayerPickUpDynamicPickup(playerid, pickupid) {
    businessPickupPickup(playerid, pickupid);
    jobsOnPickupPickup(playerid, pickupid);
    VIPOnPickupPickup(playerid, pickupid);
    RPOnPlayerPickupPickup(playerid, pickupid);
    accessoriesOnPlayerPickupPickup(playerid, pickupid);
    govOnPlayerPickupPickup(playerid, pickupid);
    factionsOnPlayerPickupPickup(playerid, pickupid);
    return 1;
}