CP,Warning and Broken CP
#1

I made a minor health FS but shows warning here:

Код:
C:\Documents and Settings\Ronny\Plocha\zk.pwn(104) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ronny\Plocha\zk.pwn(104) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ronny\Plocha\zk.pwn(104) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ronny\Plocha\zk.pwn(104) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Ronny\Plocha\zk.pwn(104) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Warnings.
Here's the code:
Код:
#include <a_samp>



#define DIALOG_SECURITY 100
#define DIALOG_SECURITY2 200

new SecurityMission;
new JOB2[MAX_PLAYERS]; // Security Povolanн
new JOB[MAX_PLAYERS];
new pickup_security;

new jobs[MAX_PLAYERS];//...
        new Float: checkpoints[][8] =
        {
            { 2153.2192,945.8641,10.8203,3.0 }, // 1
            { 2121.6907,905.4733,10.8203,3.0 }, // 2
            { 2037.7532,999.4741,10.6719,3.0 },//3
            { 2597.7217,2269.4827,10.8133 ,3.0},//4
            { 2171.0691,1683.3202,10.8203,3.0 },//5
            { 2217.9463,1836.0540,10.8203,3.0 },//6
            { 2181.4563,1994.0330,10.8203 ,3.0},//7
            { 2459.5520,2039.9741,10.8203 ,3.0} //8
        };
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("JOB JOB");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}



public OnGameModeInit()
{

    SetGameModeText("Test Mod");
    pickup_security = CreatePickup(1581, 1, 1904.4683,964.6888,10.8203,-1);

    return 1;
}

public OnGameModeExit()
{
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup_security)
    {
        ShowPlayerDialog(playerid,DIALOG_SECURITY,DIALOG_STYLE_LIST,"Security","Employ a \n Skin\n Information \n Start Mission \n denunciation ","Select","Exit");
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{

    switch(JOB2[playerid])
    {
    case 1:
    {

	}

    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_SECURITY)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                if(JOB[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFF, "[ JOB ] You are busy!");
                JOB[playerid]= 1;
                SendClientMessage(playerid,0xFFFFFFF,"You are employed by Security!");
            }
            if(listitem == 1) // They selected the second item - AK-47
            {
                SetPlayerSkin(playerid,71);
            }
            if(listitem == 2) // They selected the third item - Desert Eagle
            {
                ShowPlayerDialog(playerid,DIALOG_SECURITY2,DIALOG_STYLE_MSGBOX,"Info  Security "," Topped","OK",""); // Give them a Combat Shotgun
            }
            if(listitem == 3) // They selected the third item - Desert Eagle
            {
                if(jobs[playerid] == 20) return SendClientMessage(playerid, 0xFFFFFF, "[ JOB ] Already doing mission!");
                SecurityMission = CreateVehicle(428,1905.1967,937.9476,10.8259,0, 0, 1, -1);
                PutPlayerInVehicle(playerid,SecurityMission,0);
                new rand = random(sizeof(checkpoints));
                SetPlayerCheckpoint(playerid,10,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3],checkpoints[rand][4],checkpoints[rand][5],checkpoints[rand][6]checkpoints[rand][7]);
                JOB2[playerid] = 0;
                jobs[playerid] = 20; // Give them a Combat Shotgun
            }
            if(listitem == 4) // They selected the third item - Desert Eagle
            {
                 if(JOB[playerid] == 0) return SendClientMessage(playerid, 0xFFFFFFF, "[ JOB ]You are not employed here!");
                 JOB[playerid]= 0;
                 SendClientMessage(playerid,0xFFFFFFF,"You have given testimony");
                 // Give them a Combat Shotgun
            }
        }
        return 1;// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
    return 0;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

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

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,1905.1967,937.9476,10.8347);
    return 1;
}
And when you start the mission shows me that CP somewhere other than the ....
Reply
#2

Your SetPlayerCheckPoint:
pawn Код:
SetPlayerCheckpoint(playerid,10,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3],checkpoints[rand][4],checkpoints[rand][5],checkpoints[rand][6]checkpoints[rand][7]);
SA:MP Wiki SetPlayerCheckPoint:
pawn Код:
SetPlayerCheckPoint(playerid, Float:x, Float:y, Float:z, Float:size)
That's why it gives you the warnings.
Reply
#3

Now that I got it through a random CP so if I have this:
Код:
#include <a_samp>



#define DIALOG_SECURITY 100
#define DIALOG_SECURITY2 200

new SecurityMission;
new JOB2[MAX_PLAYERS]; // Security Povolanн
new JOB[MAX_PLAYERS];
new pickup_security;

new jobs[MAX_PLAYERS];//...
new Float: checkpoints[][8] =
{
{ 2153.2192,945.8641,10.8203 }, // 1
{ 2121.6907,905.4733,10.8203 }, // 2
{ 2037.7532,999.4741,10.6719 },//3
{ 2597.7217,2269.4827,10.8133 },//4
{ 2171.0691,1683.3202,10.8203 },//5
{ 2217.9463,1836.0540,10.8203 },//6
{ 2181.4563,1994.0330,10.8203 },//7
{ 2459.5520,2039.9741,10.8203 } //8
};
public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print("JOB JOB");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}



public OnGameModeInit()
{

    SetGameModeText("Test Mod");
    pickup_security = CreatePickup(1581, 1, 1904.4683,964.6888,10.8203,-1);

    return 1;
}

public OnGameModeExit()
{
    return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup_security)
    {
        ShowPlayerDialog(playerid,DIALOG_SECURITY,DIALOG_STYLE_LIST,"Security","Zaměstnat se\nSkin\nInformace\nZačнt Misi\nVэpověd","Vybrat","Odejнt");
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{

    switch(JOB2[playerid])
    {
    case 0:
    {

	}

    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_SECURITY)
    {
        if(response) // If they clicked 'Select' or double-clicked a weapon
        {
            // Give them the weapon
            if(listitem == 0) // They selected the first item - Desert Eagle
            {
                if(JOB[playerid] == 1) return SendClientMessage(playerid, 0xFFFFFFF, "[ JOB ] Jsi zde zaměstnбn!");
                JOB[playerid]= 1;
                SendClientMessage(playerid,0xFFFFFFF,"Zaměstal jsi se u Security!");
            }
            if(listitem == 1) // They selected the second item - AK-47
            {
                SetPlayerSkin(playerid,71);
            }
            if(listitem == 2) // They selected the third item - Desert Eagle
            {
                ShowPlayerDialog(playerid,DIALOG_SECURITY2,DIALOG_STYLE_MSGBOX,"Informace o Security "," Topped","OK",""); // Give them a Combat Shotgun
            }
            if(listitem == 3) // They selected the third item - Desert Eagle
            {
                if(jobs[playerid] == 20) return SendClientMessage(playerid, 0xFFFFFF, "[ JOB ] Jiћ dělбљ misi!");
                SecurityMission = CreateVehicle(428,1905.1967,937.9476,10.8259,0, 0, 1, -1);
                PutPlayerInVehicle(playerid,SecurityMission,0);//dela to vsude nebo jenom tady to nevнm ale kdyћ zac(nu misi tak prvnн CP jde dobr(e pak mб bэt druhej a je u birgady :/
                new rand = random(sizeof(checkpoints));
                SetPlayerCheckpoint(playerid,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2],checkpoints[rand][3]);
                JOB2[playerid] = 0;
                jobs[playerid] = 20; // Give them a Combat Shotgun
            }
            if(listitem == 4) // They selected the third item - Desert Eagle
            {
                 if(JOB[playerid] == 0) return SendClientMessage(playerid, 0xFFFFFFF, "[ JOB ]Nejsi zde zaměstnбn!");
                 JOB[playerid]= 0;
                 SendClientMessage(playerid,0xFFFFFFF,"Podal jsi vэpove");
                 // Give them a Combat Shotgun
            }
        }
        return 1;// We handled a dialog, so return 1. Just like OnPlayerCommandText.
    }
    return 0;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

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

public OnPlayerSpawn(playerid)
{
    SetPlayerPos(playerid,1905.1967,937.9476,10.8347);
    return 1;
}
}
So no warning but the CheckPoint is nowhere else than to be ...
Reply
#4

Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)