Getting 1 error
#1

pawn Код:
#include <a_samp>

new jobs;
new mechanic[MAX_PLAYERS];
new taxidriver[MAX_PLAYERS];
new newser[MAX_PLAYERS];

new checkpoint[MAX_PLAYERS];
new ScoreTimer1[MAX_PLAYERS];

#define BLUE 0x00FFFFFF
new bool:ejectFromVeh = false;

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
ScoreTimer1[playerid] = SetTimerEx("AddScore1", 60000, true, "i", playerid);
jobs = CreatePickup(1239,1,362.4671,173.6203,1008.3828,-1);
AddStaticVehicle(525,2813.3120,1374.9358,10.6291,359.5251,52,54); //
AddStaticVehicle(525,2810.2046,1374.6703,10.6505,2.0662,52,54); //
AddStaticVehicle(525,2805.8354,1367.6526,10.6473,87.9377,52,54); //
AddStaticVehicle(525,2805.3474,1364.9200,10.6606,90.0538,52,54); //
AddStaticVehicle(525,2804.8330,1361.9142,10.6475,92.9163,52,54); //
AddStaticVehicle(525,2804.7917,1358.1093,10.6266,85.3838,52,54); //
AddStaticVehicle(525,2805.5627,1355.2761,10.6437,87.1027,52,54); //
AddStaticVehicle(525,2804.6855,1351.0729,10.6465,91.5071,52,54); //
AddStaticVehicle(525,2805.5110,1347.9838,10.6357,90.3564,52,54); //
AddStaticVehicle(525,2804.8347,1345.1091,10.6614,89.6408,52,54); //
AddStaticVehicle(420,2246.9246,2034.7103,10.6270,269.8234,6,1); //
AddStaticVehicle(420,2246.8064,2038.6212,10.6172,269.6314,6,1); //
AddStaticVehicle(420,2246.7952,2042.5216,10.6194,270.4222,6,1); //
AddStaticVehicle(420,2246.6353,2046.7167,10.6165,269.2106,6,1); //
AddStaticVehicle(420,2247.1021,2050.3955,10.6270,269.8377,6,1); //
AddStaticVehicle(420,2284.5625,2050.3689,10.5950,268.2249,6,1); //
AddStaticVehicle(420,2284.6382,2046.6752,10.6235,269.4680,6,1); //
AddStaticVehicle(582,1024.3666,2238.2061,10.8681,87.9386,41,20); //
AddStaticVehicle(582,1024.5304,2263.5625,10.8650,90.9301,41,20); //
AddStaticVehicle(582,1024.1796,2270.2329,10.8650,88.8053,41,20); //
AddStaticVehicle(582,1024.1565,2279.7329,10.8650,88.4759,41,20); //
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

public OnPlayerConnect(playerid)
{
    mechanic[playerid]=0;
    taxidriver[playerid]=0;
    newser[playerid]=0;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    new mechanic[MAX_PLAYERS];
    if(strcmp(cmdtext, "/repair", true) == 0)
    {
        if(mechanic[playerid] == 0) return SendClientMessage(playerid,0xD6D6D6AA,"You are not mechanic, donot use this command again");
        {
            if(mechanic[playerid] == 1)
            {
                SetVehicleHealth(GetPlayerVehicleID(playerid), 1000);
                SendClientMessage(playerid,0xD6D6D6AA,"Sir!, The Vehicle has been repaired, and Your moneys have been -500");
                GivePlayerMoney(playerid, -500);
            }
        }
        return 1;
    }
    return 0;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == jobs)
    {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Which job you want to take","Mechanic\n TaxiDriver\n SanAndreasNews","Select","Exit");
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
            new news;
            new pickup;
            new taxier;
            if(checkpoint[playerid]==pickup)
            {
                SendClientMessage(playerid,BLUE,"You have reached at the park of job which you selected!");
            }
            if(checkpoint[playerid]==taxier)
            {
                SendClientMessage(playerid,BLUE,"You have reached at the park of job which you selected");
            }
            if(checkpoint[playerid]==news)
            {
                SendClientMessage(playerid,BLUE,"You have reached at park of job which you selected");
                }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new taxier;
    new news;
    new pickup;
    if(dialogid==1 && response==1)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the mechanic job, go to the mechanic park now");
                SendClientMessage(playerid, 0xD6D6D6AA, "Congratulations you have taken the mechanic job, Now, your variable has been = 1;, Now go to the mechanic park and for Mechanics");
                SendClientMessage(playerid,0xD6D6D6AA, "We made a special command /repair");
                pickup = SetPlayerCheckpoint(playerid,2820.6321,1367.2216,10.7500,1.5);
                mechanic[playerid] = 1;
            }
            case 1:
            {
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the Taxi job, go to the taxi park now");
                SendClientMessage(playerid, 0xD6D6D6AA,"Congratulations, you have been taken the Taxi job, go to the taxi park now");
                taxier = SetPlayerCheckpoint(playerid,2262.2725,2035.8972,10.8203,1.5);
                taxidriver[playerid] = 1;
            }
            case 2:
            {
                ShowPlayerDialog(playerid,2,DIALOG_STYLE_MSGBOX,"Mechanic","Congratulations, you have been taken the bus job, go to the News park now");
                SendClientMessage(playerid, 0xD6D6D6AA, "Congratulations, you have been taken the bus job, go to the bus park now");
                newser[playerid] = 1;
                news = SetPlayerCheckpoint(playerid,0,0,0,1.5);
            }
        }
    }
    return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    if(vehicleid == 420)
    {
    taxidriver[playerid] = 0;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "You cant drive this car");
    ejectFromVeh = true;
    }
    }
    if(vehicleid == 525)
    {
    mechanic[playerid] = 0;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "You cant drive this car");
    ejectFromVeh = true;
    }
    }
    if(vehicleid == 582)
    {
    newser[playerid] = 0;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "You cant drive this car");
    ejectFromVeh = true;
    }
    }
    return 1;
}

forward AddScore1(playerid);
public AddScore1(playerid)
{
    mechanic[playerid] = 1;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "Go to the city hall, and then go to the manager office to take the wage");
    CreatePickup(1239,1,0,0,0,-1);
    KillTimer(ScoreTimer1[playerid]);
    }
    taxidriver[playerid] = 1;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "Go to the city hall, and then go to the manager office to take the wage");
    CreatePickup(1239,1,0,0,0,-1);
    KillTimer(ScoreTimer1[playerid]);
    }
    newser[playerid] = 1;
    {
    SendClientMessage(playerid, 0xD6D6D6AA, "Go to the city hall, and then go to the manager office to take the wage");
    CreatePickup(1239,1,0,0,0,-1);
    KillTimer(ScoreTimer1[playerid]);
    }
    return 1;
}
I'm getting 1 error in this
that is C:\DOCUME~1\MOSTWA~1\Desktop\joby.pwn(19) : error 017: undefined symbol "playerid"
and the 19 line is: ScoreTimer1[playerid] = SetTimerEx("AddScore1", 60000, true, "i", playerid);
Help me to remove this error
Reply
#2

there is no playerid parameters OnFilterScriptInit

you must loop it instead using playerid.
Reply
#3

WAt you mean, can you do it? and then paste it here in [pawn] code
I don't understand that wat you mean?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)