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



Pawno Errors - Yordan_Kronos - 04.06.2012

pawn Код:
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(133) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(133) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(133) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(135) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(139) : error 017: undefined symbol "pickupid"
C:\Documents and Settings\Administrator\Desktop\TARGOVISHTE ROLEPLAY\filterscripts\truck.pwn(144) : error 030: compound statement not closed at the end of file (started at line 116)
pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if((truckjobrunning) == 1)
    {
        truckjobrunning = 0;
        SendClientMessage(playerid, COLOR_RED, "You left your truck behind, get in again if you want to continue your job.");

    }else if((truckjobrunning) == 0){
    if((flyjobrunning) == 1)
    {
        flyjobrunning = 0;
        SendClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");

    }else if((flyjobrunning) == 0){

        //Nothing
 }
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == info)
    {
    GameTextForPlayer(playerid, "~g~Welcome at the Truck Driver job, use /truckinfo to know more", 3000, 3);
    }
    if(pickupid == info)
    {
    GameTextForPlayer(playerid, "~g~Welcome at the Fly job, use /flyinfo to know more", 3000, 3);
    }
}



Re: Pawno Errors - Sandiel - 04.06.2012

The OnPlayerPickUpPickup should return a value...
Also, Try IsPlayerInRangeOfPoint instead of pickupid == something.


Re: Pawno Errors - IceCube! - 04.06.2012

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
{
    if((truckjobrunning) == 1)
    {
        truckjobrunning = 0;
        SendClientMessage(playerid, COLOR_RED, "You left your truck behind, get in again if you want to continue your job.");
    }
    else if((truckjobrunning) == 0)
    {
        if((flyjobrunning) == 1)
        {
            flyjobrunning = 0;        
            endClientMessage(playerid, COLOR_RED, "You left the plane, you failed the job.");
        }
        else if((flyjobrunning) == 0)
        {        //Nothing }}
        }
    }
    return 1;
}
You were missing a bracket or two and you forgot to return.


Re: Pawno Errors - Firo - 04.06.2012

pickupid is not definded.


Re: Pawno Errors - IceCube! - 04.06.2012

Quote:
Originally Posted by Firo
Посмотреть сообщение
pickupid is not definded.
Pickup ID wasn't defined as he wasn't returning a value, your answer isn't valid.


Re: Pawno Errors - Firo - 04.06.2012

Quote:
Originally Posted by IceCube!
Посмотреть сообщение
Pickup ID wasn't defined as he wasn't returning a value, your answer isn't valid.
I just saw that now, you right.