Jump to content
  • 0

error 001: expected token: ";", but found "if"


shean

Question

D:\samp03\filterscripts\VamaT.pwn(32) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(46) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(50) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(89) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(90) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(105) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(106) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(119) : warning 225: unreachable code

D:\samp03\filterscripts\VamaT.pwn(119) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(119) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(119) : warning 215: expression has no effect

D:\samp03\filterscripts\VamaT.pwn(119) : error 001: expected token: ";", but found "if"

D:\samp03\filterscripts\VamaT.pwn(126) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(127) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(148) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(149) : warning 217: loose indentation

D:\samp03\filterscripts\VamaT.pwn(163) : error 054: unmatched closing brace ("}")

D:\samp03\filterscripts\VamaT.pwn(164) : error 010: invalid function or declaration

D:\samp03\filterscripts\VamaT.pwn(182) : warning 217: loose indentation

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

Liniile: 119

[pawn]  else if(PlayerToPoint(5.0, playerid, -9.1664,-1361.7852,10.7733))[/pawn]

163:

[pawn]            } [/pawn]

164:

[pawn]  return 0;[/pawn]]

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

D:\samp03\filterscripts\VamaT.pwn(120) : warning 225: unreachable code

D:\samp03\filterscripts\VamaT.pwn(120) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(120) : warning 215: expression has no effect

D:\samp03\filterscripts\VamaT.pwn(120) : error 001: expected token: ";", but found "if"

D:\samp03\filterscripts\VamaT.pwn(164) : error 054: unmatched closing brace ("}")

D:\samp03\filterscripts\VamaT.pwn(165) : error 010: invalid function or declaration

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

4 Errors.

poftim :

[pawn]        //------------------------------------Barrier--------------------------------------

            if(strcmp(cmdtext, "/vamat", true) == 0)

                {

                if(PlayerToPoint(3.0, playerid,  -16.8223,-1339.8367,10.9937))

                    {

                                if(PlayerInfo[playerid][pPassport] == 1)

                                    {

                                    MoveObject(vama1, -17.424459457397,-1345.57421875,11.012575149536, 5.5);

                                    SetTimer("vama1Close", 3000, 0);

                                    SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");

                        GivePlayerMoney(playerid,-100);

                                    return 1;

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

                                    return 1;

                                    }

                                    }

                            else if(PlayerToPoint(5.0, playerid, -21.9065,-1336.4952,10.9705))

                                {

                                if(PlayerInfo[playerid][pPassport] == 1)

                                    {

                                    MoveObject(vama, -26.411027908325,-1334.9334716797,10.775354385376, 5.5);

                                    SetTimer("vamaClose", 3000, 0);

                                    SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");

                        GivePlayerMoney(playerid,-100);

                                    return 1;

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

                                    return 1;

                                    }

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");

                                    return 1;

                                    }

120:                            else if(PlayerToPoint(5.0, playerid, -9.1664,-1361.7852,10.7733))

                                {

                                if(PlayerInfo[playerid][pPassport] == 1)

                                    {

                                    MoveObject(vama2, -8.9464988708496,-1356.9973144531,10.706520080566, 5.5);

                                    SetTimer("vamaClose", 3000, 0);

                                    SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");

                        GivePlayerMoney(playerid,-100);

                                    return 1;

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

                                    return 1;

                                    }

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");

                                    return 1;

                                    }

}

                            else if(PlayerToPoint(5.0, playerid, -5.5553,-1367.1934,10.7790))

                                {

                                if(PlayerInfo[playerid][pPassport] == 1)

                                    {

                                    MoveObject(vama3, -0.12400734424591,-1367.9291992188,11.005669593811, 5.5);

                                    SetTimer("vamaClose", 3000, 0);

                                    SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");

                        GivePlayerMoney(playerid,-100);

                                    return 1;

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

                                    return 1;

                                    }

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");

                                    return 1;

                                    }

}

164            }

165                  return 0;

    }[/pawn]

Link to comment
Share on other sites

Schimba porcaria aia de cod negandit si lung in chestia asta mica, desteapta, care face acelasi lucru in joc ca si chestia aia lunga ( xD ):

//------------------------------------Barrier--------------------------------------
if(strcmp(cmdtext, "/vamat", true) == 0)
{
    if(PlayerInfo[playerid][pPassport] == 0)
		return SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

	if(PlayerToPoint(3.0, playerid,  -16.8223,-1339.8367,10.9937))
	{
		MoveObject(vama1, -17.424459457397,-1345.57421875,11.012575149536, 5.5);
		SetTimer("vama1Close", 3000, 0);
		SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
		GivePlayerMoney(playerid,-100);
	}
	else if(PlayerToPoint(5.0, playerid, -21.9065,-1336.4952,10.9705))
	{
		MoveObject(vama, -26.411027908325,-1334.9334716797,10.775354385376, 5.5);
		SetTimer("vamaClose", 3000, 0);
		SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
		GivePlayerMoney(playerid,-100);
	}
	else if(PlayerToPoint(5.0, playerid, -9.1664,-1361.7852,10.7733))
	{
		MoveObject(vama2, -8.9464988708496,-1356.9973144531,10.706520080566, 5.5);
		SetTimer("vamaClose", 3000, 0);
		SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
		GivePlayerMoney(playerid,-100);
	}
	else if(PlayerToPoint(5.0, playerid, -5.5553,-1367.1934,10.7790))
	{
		MoveObject(vama3, -0.12400734424591,-1367.9291992188,11.005669593811, 5.5);
		SetTimer("vamaClose", 3000, 0);
		SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");
		GivePlayerMoney(playerid,-100);
	}
	else SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");

	return 0;
}

:))

Link to comment
Share on other sites

Am schimbat si mi-a aparut erori care nu erau.

D:\samp03\filterscripts\VamaT.pwn(86) : error 004: function "PlayerToPoint" is not implemented

D:\samp03\filterscripts\VamaT.pwn(93) : error 004: function "PlayerToPoint" is not implemented

D:\samp03\filterscripts\VamaT.pwn(100) : error 004: function "PlayerToPoint" is not implemented

D:\samp03\filterscripts\VamaT.pwn(107) : error 004: function "PlayerToPoint" is not implemented

D:\samp03\filterscripts\VamaT.pwn(118) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(118) : error 004: function "PlayerToPoint" is not implemented

D:\samp03\filterscripts\VamaT.pwn(125) : error 017: undefined symbol "x"

D:\samp03\filterscripts\VamaT.pwn(126) : error 017: undefined symbol "y"

D:\samp03\filterscripts\VamaT.pwn(127) : error 017: undefined symbol "z"

D:\samp03\filterscripts\VamaT.pwn(129) : error 017: undefined symbol "radi"

D:\samp03\filterscripts\VamaT.pwn(136) : warning 225: unreachable code

D:\samp03\filterscripts\VamaT.pwn(136) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(136) : error 004: function "OnPlayerConnect" is not implemented

D:\samp03\filterscripts\VamaT.pwn(141) : warning 225: unreachable code

D:\samp03\filterscripts\VamaT.pwn(141) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(141) : error 004: function "OnPlayerPickUpPickup" is not implemented

D:\samp03\filterscripts\VamaT.pwn(143) : error 017: undefined symbol "pickupid"

D:\samp03\filterscripts\VamaT.pwn(147) : error 017: undefined symbol "pickupid"

D:\samp03\filterscripts\VamaT.pwn(154) : error 030: compound statement not closed at the end of file (started at line 81)

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

17 Errors.

Link to comment
Share on other sites

Am facut eu ceva dar:

D:\samp03\filterscripts\VamaT.pwn(122) : warning 225: unreachable code

D:\samp03\filterscripts\VamaT.pwn(122) : error 029: invalid expression, assumed zero

D:\samp03\filterscripts\VamaT.pwn(122) : warning 215: expression has no effect

D:\samp03\filterscripts\VamaT.pwn(122) : error 001: expected token: ";", but found "if"

D:\samp03\filterscripts\VamaT.pwn(165) : warning 225: unreachable code

Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

2 Errors.

[pawn] 122:  else if(PlayerToPoint(5.0, playerid, -9.1664,-1361.7852,10.7733))

                        {

                                if(PlayerInfo[playerid][pPassport] == 1)

                                    {

                                    MoveObject(vama2, -8.9464988708496,-1356.9973144531,10.706520080566, 5.5);

                                    SetTimer("vamaClose", 3000, 0);

                                    SendClientMessage(playerid, COLOR_1GREEN, "Ai platit vamei 100$ pentru a putea trece..Vama se va inchide in 3 secunde");

                        GivePlayerMoney(playerid,-100);

                                    return 1;

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "* You don't have an Passport, go in the City Hall and buy one.");

                                    return 1;

                                    }

                                    }

                                    else

                                    {

                                    SendClientMessage(playerid, COLOR_WHITE, "You are not at Barrier.");

                                    return 1;

                                    }

                                    }[/pawn]

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.