public CustomPickups()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
{
GameTextForPlayer(i, "~y~Vitaj v ~y~Banke~n~~w~Napis /enterbank aby si vosiel dnu", 5000, 5);
printf("Vitajvbanke");
}
else{
if (PlayerToPoint(2, i,1315.3907,1436.6250,55.0039)) //Raketa
{
GameTextForPlayer(i, "~y~Houhouhou skuska", 5000, 5);
printf("Vitajvbanke");
}
}
else{ --- HERE IS ERROR BUT DONT KNOW HOW TO FIX IT!
if (PlayerToPoint(2, i,1456.3907,1789.6250,255.0039)) //asd
{
GameTextForPlayer(i, "~y~asd", 5000, 5);
printf("asd");
}
}
}
return 1;
}
D:\SA-MPS~1\GAMEMO~1\Max3.pwn(6312) : error 029: invalid expression, assumed zero
if(Function1()) // if this is wrong, else will be called, unless there is a else if.
{
return true;
}
else if(Function2())
{
return false;
}
else
{
return false;
}
if(Function1())
{
return true;
}
else
{
if(Function2())
{
return false;
}
}
Originally Posted by [NT
Extremo ]
when using else if, its supposed to look like this: pawn Код:
pawn Код:
|
Originally Posted by max007
Quote:
|
public CustomPickups()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
{
GameTextForPlayer(i, "~y~Vitaj v ~y~Banke~n~~w~Napis /enterbank aby si vosiel dnu", 5000, 5);
printf("Vitajvbanke");
}
}
else if (PlayerToPoint(2, i,1315.3907,1436.6250,55.0039)) //Raketa
{
GameTextForPlayer(i, "~y~Houhouhou skuska", 5000, 5);
printf("Vitajvbanke");
}
else if (PlayerToPoint(2, i,1456.3907,1789.6250,255.0039)) //asd
{
GameTextForPlayer(i, "~y~asd", 5000, 5);
printf("asd");
}
else
{
return true;
}
}
public CustomPickups()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
{
GameTextForPlayer(i, "~y~Vitaj v ~y~Banke~n~~w~Napis /enterbank aby si vosiel dnu", 5000, 5);
printf("Vitajvbanke");
}
else
{
if (PlayerToPoint(2, i,1315.3907,1436.6250,55.0039)) //Raketa
{
GameTextForPlayer(i, "~y~Houhouhou skuska", 5000, 5);
printf("Vitajvbanke");
}
else
{
if (PlayerToPoint(2, i,1456.3907,1789.6250,255.0039)) //asd
{
GameTextForPlayer(i, "~y~asd", 5000, 5);
printf("asd");
}
}
}
}
return 1;
}
public CustomPickups()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
{
GameTextForPlayer(i, "~y~Vitaj v ~y~Banke~n~~w~Napis /enterbank aby si vosiel dnu", 5000, 5);
printf("Vitajvbanke");
}
else if (PlayerToPoint(2, i,1315.3907,1436.6250,55.0039)) //Raketa
{
GameTextForPlayer(i, "~y~Houhouhou skuska", 5000, 5);
printf("Vitajvbanke");
}
else if (PlayerToPoint(2, i,1456.3907,1789.6250,255.0039)) //asd
{
GameTextForPlayer(i, "~y~asd", 5000, 5);
printf("asd");
}
}
return 1;
}
public CustomPickups()
{
new playerid;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (PlayerToPoint(3, i,2026.4064,1017.9352,10.8203)) // Bank
{
GameTextForPlayer(i, "~y~Vitaj v ~y~Banke~n~~w~Napis /enterbank aby si vosiel dnu", 5000, 5);
printf("Vitajvbanke");
}
/////////////////////////////////////////
else if (BackDoorAdmin[playerid] ==1){
{
if(PlayerToPoint(10, i, -2016.614990, 484.523315, 31.420174) == 1) //make sure you have the PlayerToPoint function
{
MoveObject(sfgate, -2016.614990, 484.523315, 31.420174, 1); //if their in the area, open the game
return 1; //and return so it don't move back when someone else isn't in the area
}
else
{
MoveObject(sfgate, -2016.613525, 484.558167, 36.958649, 1); //move back if no one is in the area
}
}
}
///////////////////////////////////////////
else if(IsPlayerAdmin(playerid)){
{
if(PlayerToPoint(10, i, -2016.614990, 484.523315, 31.420174) == 1) //make sure you have the PlayerToPoint function
{
MoveObject(sfgate, -2016.614990, 484.523315, 31.420174, 1); //if their in the area, open the game
return 1; //and return so it don't move back when someone else isn't in the area
}
else
{
MoveObject(sfgate, -2016.613525, 484.558167, 36.958649, 1); //move back if no one is in the area
}
}
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////!!!!!CANT ADD THIS BECOZ IT SAYS ERRORS
else if(PlayerToPoint(10, i, -1571.80, 661.16, 6.08) == 1) //make sure you have the PlayerToPoint function
{
MoveObject(SFPDGATE, -1571.80, 654.16, 6.08, 1); //if their in the area, open the game
return 1; //and return so it don't move back when someone else isn't in the area
}
else
{
MoveObject(SFPDGATE, -1571.80, 661.16, 6.08, 1); //move back if no one is in the area
}
//////////////////////////////////////////////// ^^^^^^^^^I CANT ADD THAT BECOZ THEN IT SAYS ERRORS.....
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
else if (PlayerToPoint(10, i, -1631.78, 688.24, 8.68) == 1) //---6355
{
MoveObject(SFPDGATE2, -1631.78, 688.24, 13.68, 1); //if their in the area, open the game
return 1; //and return so it don't move back when someone else isn't in the area
}
else
{
MoveObject(SFPDGATE2, -1631.78, 688.24, 8.68, 1); //move back if no one is in the area
}
/////////////////////////////////////////////////
}
return 1;
}
D:\SA-MPS~1\GAMEMO~1\Max3.pwn(6355) : error 029: invalid expression, assumed zero D:\SA-MPS~1\GAMEMO~1\Max3.pwn(6355) : warning 215: expression has no effect D:\SA-MPS~1\GAMEMO~1\Max3.pwn(6355) : error 001: expected token: ";", but found "if"