HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
DarkPower - 03.06.2010
pawn Код:
new counter = 0;
for(new i = 71 || 72 || 73 || 117 i++)
{
new dist = CheckPlayerDistanceToVehicle(7, playerid, i);
if(dist)
ERROR:
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
LINE:
pawn Код:
for(new i = 71 || 72 || 73 || 117 i++)
Can someone help
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
iStarzz - 03.06.2010
Try this:
Код:
for(new i = 71 || 72 || 73 || 117 i++))
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
DarkPower - 03.06.2010
Then i get this errors
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 001: expected token: ";", but found "-identifier-"
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 029: invalid expression, assumed zero
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39017) : error 017: undefined symbol "i"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
iStarzz - 03.06.2010
No idea then sorry,
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP - WackoX - 03.06.2010
What are you trying to do, a loop or a switch?
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
MrLeNy - 03.06.2010
Код:
for(new i = 71 || i = 72 || i = 73 || i = 117 i++)
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
DarkPower - 03.06.2010
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 022: must be lvalue (non-constant)
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : warning 215: expression has no effect
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 001: expected token: ";", but found "-identifier-"
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : error 017: undefined symbol "i"
C:\Users\NASTIE\Desktop\MX-RP\gamemodes\mexico.pwn(39015) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Quote:
Originally Posted by WackoX
What are you trying to do, a loop or a switch?
|
That is for command /news look >>
pawn Код:
if(strcmp(cmd, "/news", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 9 || PlayerInfo[playerid][pLeader] == 9)
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, "You are muted");
return 1;
}
new counter = 0;
for(new i = 71 || i = 72 || i = 73 || i = 117 i++))
{
new dist = CheckPlayerDistanceToVehicle(7, playerid, i);
if(dist)
{
counter++;
}
}
if(counter == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You are not close to news chopper");
return 1;
}
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
MadeMan - 03.06.2010
pawn Код:
for(new i = 71 || i = 72 || i = 73 || i = 117 i++))
{
new dist = CheckPlayerDistanceToVehicle(7, playerid, i);
if(dist)
{
counter++;
}
}
Replace this with
pawn Код:
new VehicleList[] = {71,72,73,117};
for(new i = 0; i < sizeof(VehicleList); i++)
{
if(CheckPlayerDistanceToVehicle(7, playerid, VehicleList[i]))
{
counter++;
}
}
Re: HELP >>>> CheckPlayerDistanceToVehicle <<<< HELP -
DarkPower - 03.06.2010
Thanks