SA-MP Forums Archive
Help - 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: Help (/showthread.php?tid=575661)



Help - ZachKnoxx - 29.05.2015

so pretty much I'm a terrible scripter that needs help from something that is probably very easy to fix:

Код HTML:
C:\Users\Zach\Desktop\Folders\Servers\SAMP\abc\gamemodes\RP.pwn(277) : error 010: invalid function or declaration
C:\Users\Zach\Desktop\Folders\Servers\SAMP\abc\gamemodes\RP.pwn(280) : error 010: invalid function or declaration
C:\Users\Zach\Desktop\Folders\Servers\SAMP\abc\gamemodes\RP.pwn(282) : error 054: unmatched closing brace ("}")
C:\Users\Zach\Desktop\Folders\Servers\SAMP\abc\gamemodes\RP.pwn(284) : error 010: invalid function or declaration
Код HTML:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(DVehicles[1] || DVehicles[2] || DVehicles[3] || DVehicles[4]  == vehicleid)
        {
        SendClientMessage(playerid, COLOR_LIGHTRED, "DELIVERY JOB:{FFFFFF} To start a Delivery Job use /deliverstock. (Rule: You may not use this vehicle for personal use)");
        } else {
            //something else here if you are having a lock system
        }
        }
    if(PBVehicles[1] || PBVehicles[2] || PBVehicles[3] || PBVehicles[4]  == vehicleid)
        {
        SendClientMessage(playerid, COLOR_LIGHTRED, "PIZZA JOB:{FFFFFF} To start a Pizza Job use /deliverpizza. (Rule: You may not use this vehicle for personal use)");
        } else {
            //something else here if you are having a lock system
        }
        }
        return 1;
}



Re: Help - SickAttack - 29.05.2015

Too much curly braces, bro:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(DVehicles[1] || DVehicles[2] || DVehicles[3] || DVehicles[4]  == vehicleid)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "DELIVERY JOB:{FFFFFF} To start a Delivery Job use /deliverstock. (Rule: You may not use this vehicle for personal use)");
    }
    else
    {
        //something else here if you are having a lock system
    }
   
    if(PBVehicles[1] || PBVehicles[2] || PBVehicles[3] || PBVehicles[4]  == vehicleid)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "PIZZA JOB:{FFFFFF} To start a Pizza Job use /deliverpizza. (Rule: You may not use this vehicle for personal use)");
    }
    else
    {
        //something else here if you are having a lock system
    }
    return 1;
}



Re: Help - ZachKnoxx - 29.05.2015

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Too much curly braces, bro:

pawn Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(DVehicles[1] || DVehicles[2] || DVehicles[3] || DVehicles[4]  == vehicleid)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "DELIVERY JOB:{FFFFFF} To start a Delivery Job use /deliverstock. (Rule: You may not use this vehicle for personal use)");
    }
    else
    {
        //something else here if you are having a lock system
    }
   
    if(PBVehicles[1] || PBVehicles[2] || PBVehicles[3] || PBVehicles[4]  == vehicleid)
    {
        SendClientMessage(playerid, COLOR_LIGHTRED, "PIZZA JOB:{FFFFFF} To start a Pizza Job use /deliverpizza. (Rule: You may not use this vehicle for personal use)");
    }
    else
    {
        //something else here if you are having a lock system
    }
    return 1;
}
thanks, +rep