CP and Random
#1

Hello throws me this error:


C:\Documents and Settings\Ronny\Plocha\zk.pwn(81) : error 017: undefined symbol "checkpoints"
C:\Documents and Settings\Ronny\Plocha\zk.pwn(81) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ronny\Plocha\zk.pwn(81) : warning 215: expression has no effect
C:\Documents and Settings\Ronny\Plocha\zk.pwn(82) : error 017: undefined symbol "checkpoints"
C:\Documents and Settings\Ronny\Plocha\zk.pwn(82) : warning 215: expression has no effect
C:\Documents and Settings\Ronny\Plocha\zk.pwn(82) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Ronny\Plocha\zk.pwn(82) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Ronny\Plocha\zk.pwn(82) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


6 Errors.



Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#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 checkpoints;
new jobs[MAX_PLAYERS];//...
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 Mise\nVэpověd","Vybrat","Odejнt");
    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
 	if(dialogid == 1)
	{
        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 ] Here you're busy!");
				JOB[playerid]= 1;
			  	SendClientMessage(playerid,0xFFFFFFF,"You are employed by Security! Here you're busy!");
			}
            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,"Information 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 ] I do mission!");
                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ћ začnu misi tak prvnн CP jde dobře pak mб bэt druhej a je u birgady :/
				new rand = random(sizeof(checkpoints));
				SetPlayerCheckpoint(playerid,2,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2]/*,0,0,0,5.0*/);
				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 OnPlayerEnterCheckpoint(playerid)
{

	switch(JOB2[playerid])
	{

  new Float: checkpoints[][3] =
{
  { 379.9200,2223.7539,42.0938},
  { 901.1568,1998.0510,60.9141 },
  { 1713.6024,1605.5175,10.0156 },
  { 2597.7217,2269.4827,10.8133 },
  { 523.5439,2590.9675,53.4141 },
  { 1485.0864,2539.3105,55.8359 },
  { 2260.9390,2314.3367,4.8125 },
  { 2619.0334,1398.3802,7.1016 }
};


 	}
	return 1; 
}


public OnPlayerConnect(playerid)
{
	return 1;
}

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

public OnPlayerSpawn(playerid)
{
	SetPlayerPos(playerid,2176.9985,1682.7179,10.8203);
	return 1;
}
Reply
#2

Help Me Please
Reply
#3

Here, hope it works.
pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#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 checkpoints;
new jobs[MAX_PLAYERS];//...
        new Float: checkpoints[][8] =
        {
            { 379.9200,2223.7539,42.0938},
            { 901.1568,1998.0510,60.9141 },
            { 1713.6024,1605.5175,10.0156 },
            { 2597.7217,2269.4827,10.8133 },
            { 523.5439,2590.9675,53.4141 },
            { 1485.0864,2539.3105,55.8359 },
            { 2260.9390,2314.3367,4.8125 },
            { 2619.0334,1398.3802,7.1016 }
        };
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","Zame(stnat se\nSkin\nInformace\nZac(нt Mise\nVэpove(d","Vybrat","Odejнt");
    }
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{

    switch(JOB2[playerid])
    {
    case 1:
    {
/*      new Float: checkpoints[][8] =
        {
            { 379.9200,2223.7539,42.0938},
            { 901.1568,1998.0510,60.9141 },
            { 1713.6024,1605.5175,10.0156 },
            { 2597.7217,2269.4827,10.8133 },
            { 523.5439,2590.9675,53.4141 },
            { 1485.0864,2539.3105,55.8359 },
            { 2260.9390,2314.3367,4.8125 },
            { 2619.0334,1398.3802,7.1016 }
        };*/

    }

    }
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        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 ] Here you're busy!");
                JOB[playerid]= 1;
                SendClientMessage(playerid,0xFFFFFFF,"You are employed by Security! Here you're busy!");
            }
            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,"Information 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 ] I do mission!");
                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,2,checkpoints[rand][0],checkpoints[rand][1],checkpoints[rand][2]);
                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,2176.9985,1682.7179,10.8203);
    return 1;
}
Reply
#4

Thank you so much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)