Pawn Compiler Crashing On Compile
#1

I've just entered loads of new code for my trash collecting job on my script and now pawn compiler is crashing and not allowing me to see what the error is. I'm having a major brain fart trying to figure it out considering my script is about 30k lines of code now. Here's what I have added to the script for my trash job. If you spot any errors please point them out!

pawn Код:
/// ENTERING THE TRASH VEHICLE

if(GetVehicleModel(vehicleid) == 408)
        {
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "----------------------------------------------");
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "You can earn $600 from this side job for each trash run");
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "If you would like to start this sidejob type /sftrash or /lstrash");
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "(( /sftrash = San Fierro Area )) (( /lstrash = Los Santos Area ))");
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "----------------------------------------------");
            TogglePlayerControllable(playerid, 0);
        }
       
/// COMMAND FOR STARTING THE TRASH COLLECTING JOB
       
        if(strcmp("/lstrash", cmd, true) == 0)
        {
            if(GetVehicleModel(vehicleid) ==408)
            {
                if(TrashCollecting[playerid] == 0)
                {
                    TrashCollecting[playerid] = 1;
                    LSTrash[playerid] = 1;
                    TrashAmount[playerid] = 0;
                    SendClientMessage(playerid,COLOR_RED,"You decided to take the sidejob earning $600 for each trash run!");
                    SendClientMessage(playerid,COLOR_RED,"You have chosen the Los Santos zone");
                    SendClientMessage(playerid,COLOR_RED,"You will need to head to the first marker to collect the trash!");
                    SendClientMessage(playerid,COLOR_WHITE,"Please /scan your ID card! (( /scan ))");
                    new rand = random(sizeof(lstrashcheckpoints));
                    SetPlayerCheckpoint(playerid, lstrashcheckpoints[rand][0], lstrashcheckpoints[rand][1], lstrashcheckpoints[rand][2], 5.0);
                    return 1;
                }
                else
                {
                    TrashCollecting[playerid] = 0;
                    LSTrash[playerid] = 0;
                    TrashAmount[playerid] = 0;
                    DisablePlayerCheckpoint(playerid);
                    SendClientMessage(playerid,COLOR_RED,"You decided to stop the sidejob.");
                    return 1;
                }
            }
        }
        if(strcmp("/sftrash", cmd, true) == 0)
        {
            if(GetVehicleModel(vehicleid) ==408)
            {
                if(TrashCollecting[playerid] == 0)
                {
                    TrashCollecting[playerid] = 1;
                    SFTrash[playerid] = 1;
                    TrashAmount[playerid] = 0;
                    SendClientMessage(playerid,COLOR_RED,"You decided to take the sidejob earning $600 for each trash run!");
                    SendClientMessage(playerid,COLOR_RED,"You have chosen the San Fierro zone");
                    SendClientMessage(playerid,COLOR_RED,"You will need to head to the first marker to collect the trash!");
                    SendClientMessage(playerid,COLOR_WHITE,"Please /scan your ID card! (( /scan ))");
                    new rand = random(sizeof(sftrashcheckpoints));
                    SetPlayerCheckpoint(playerid, sftrashcheckpoints[rand][0], sftrashcheckpoints[rand][1], sftrashcheckpoints[rand][2], 5.0);
                    return 1;
                }
                else
                {
                    TrashCollecting[playerid] = 0;
                    SFTrash[playerid] = 0;
                    TrashAmount[playerid] = 0;
                    DisablePlayerCheckpoint(playerid);
                    SendClientMessage(playerid,COLOR_RED,"You decided to stop the sidejob.");
                    return 1;
                }
            }
        }
       
       
////// CHECKPOINT CHECKING HOW MUCH TRASH ETC
       
    if(TrashCollecting[playerid] == 1 && LSTrash[playerid] == 1 && TrashAmount[playerid] <= 3)
    {
        if(GetVehicleModel(vehicleid) == 408)
        {
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid,COLOR_RED, "You are collecting the trash!");
            PRTrash[playerid] = SetTimerEX("PRTrashFill", 1500,1,"i",playerid);
            TrashAmount[playerid] = +1;
            return 1;
        }
    }
    if(TrashCollecting[playerid] == 1 && SFTrash[playerid] == 1 && TrashAmount[playerid] <= 3)
    {
        if(GetVehicleModel(vehicleid) == 408)
        {
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid,COLOR_RED, "You are collecting the trash!");
            PRTrash[playerid] = SetTimerEX("PRTrashFill", 1500,1,"i",playerid);
            TrashAmount[playerid] = +1;
            return 1;
        }
    }
    if(TrashCollecting[playerid] == 1 && LSTrash[playerid] == 1 && TrashAmount[playerid] == 4)
    {
        if(GetVehicleModel(vehicleid) == 408)
        {
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid,COLOR_RED, "Your truck is being emptied of trash!");
            PRTrash[playerid] = SetTimerEX("PRTrashEmpty", 2000,1,"i",playerid);
            TrashAmount[playerid] = 0;
            return 1;
        }
    }
    if(TrashCollecting[playerid] == 1 && SFTrash[playerid] == 1 && TrashAmount[playerid] == 4)
    {
        if(GetVehicleModel(vehicleid) == 408)
        {
            TogglePlayerControllable(playerid, 0);
            SendClientMessage(playerid,COLOR_RED, "Your truck is being emptied of trash!");
            PRTrash[playerid] = SetTimerEX("PRTrashEmpty", 2000,1,"i",playerid);
            TrashAmount[playerid] = 0;
            return 1;
        }
    }

///// TRASH FILL TIMER

forward PRTrashFill(playerid);
public PRTrashFill(playerid)
{
    new string[128];
    new vehicletrash = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicletrash) == 408)
    {
        PRTrashAmount[playerid] += 10;
        format(string, sizeof(string), "~w~Collecting Trash~n~~g~%d %", PRTrashAmount[playerid] );
        GameTextForPlayer(playerid, string, 5000, 4);
    }
    if(PRTrashAmount[playerid] == 100 && TrashAmount[playerid] <= 3 && LSTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You have emptied the bins of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the next marker to collect the trash!");
        new rand = random(sizeof(lstrashcheckpoints));
        SetPlayerCheckpoint(playerid, lstrashcheckpoints[rand][0], lstrashcheckpoints[rand][1], lstrashcheckpoints[rand][2], 5.0);
        KillTimer(PRTrashFill[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
    if(PRTrashAmount[playerid] == 100 && TrashAmount[playerid] == 4 && LSTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "Your truck is now full of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the Los Santos Skip to empty your truck!");
        SetPlayerCheckpoint(playerid, LSTRASHX, LSTRASHY, LSTRASHZ, 5.0);
        KillTimer(PRTrashFill[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
    if(PRTrashAmount[playerid] == 100 && TrashAmount[playerid] <= 3 && SFTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You have emptied the bins of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the next marker to collect the trash!");
        new rand = random(sizeof(sftrashcheckpoints));
        SetPlayerCheckpoint(playerid, sftrashcheckpoints[rand][0], sftrashcheckpoints[rand][1], sftrashcheckpoints[rand][2], 5.0);
        KillTimer(PRTrashFill[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
    if(PRTrashAmount[playerid] == 100 && TrashAmount[playerid] == 4 && SFTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "Your truck is now full of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the Los Santos Skip to empty your truck!");
        SetPlayerCheckpoint(playerid, SFTRASHX, SFTRASHY, SFTRASHZ, 5.0);
        KillTimer(PRTrashFill[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
}

/////// TRASH EMPTY TIMER

forward PRTrashEmpty(playerid);
public PRTrashEmpty(playerid)
{
    new string[128];
    new vehicletrashempty = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(vehicletrashempty) == 408)
    {
        PRTrashAmount[playerid] += 10;
        format(string, sizeof(string), "~w~Emptying Trash~n~~g~%d %", PRTrashAmount[playerid] );
        GameTextForPlayer(playerid, string, 5000, 4);
    }
    if(PRTrashAmount[playerid] == 100 && LSTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "Your truck has been emptied of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the next marker to continue collecting the trash!");
        new rand = random(sizeof(lstrashcheckpoints));
        SetPlayerCheckpoint(playerid, lstrashcheckpoints[rand][0], lstrashcheckpoints[rand][1], lstrashcheckpoints[rand][2], 5.0);
        KillTimer(PRTrashEmpty[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
    if(PRTrashAmount[playerid] == 100 && SFTrash[playerid] == 1)
    {
        SendClientMessage(playerid, COLOR_RED, "Your truck has been emptied of trash!");
        SendClientMessage(playerid, COLOR_RED, "Head to the next marker to continue collecting the trash!");
        new rand = random(sizeof(sftrashcheckpoints));
        SetPlayerCheckpoint(playerid, sftrashcheckpoints[rand][0], sftrashcheckpoints[rand][1], sftrashcheckpoints[rand][2], 5.0);
        KillTimer(PRTrashEmpty[playerid]);
        PRTrashAmount[playerid] = 0;
        TogglePlayerControllable(playerid, 1);
    }
}

///////// LEAVE TRUCK ENDS JOB

        if(TrashCollecting[playerid] == 1)
        {
            SendClientMessage(playerid,COLOR_RED,"You have left the truck, you're no longer taking the sidejob!");
            TrashCollecting[playerid] = 0;
            TrashAmount[playerid] = 0;
            SFTrash[playerid] = 0;
            LSTrash[playerid] = 0;
        }
Any help is muchly appreciated!
Reply
#2

[SOLVED] Was being a retard x)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)