SA-MP Forums Archive
2 problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 2 problems (/showthread.php?tid=313795)



2 problems - Face9000 - 27.01.2012

1st problem:

pawn Код:
if(!IsPlayerInRangeOfPoint(playerid, -1955.7682, 306.0241, 41.0471 && !IsPlayerInRangeOfPoint(playerid, -2051.8413,86.1440,28.3977) && !IsPlayerInRangeOfPoint(playerid, -2141.5591,-256.7738,40.7195))
    return SendClientMessage(playerid, red, "You are not at a robbery location.");
Код:
warning 202: number of arguments does not match definition
warning 202: number of arguments does not match definition
warning 213: tag mismatch
warning 202: number of arguments does not match definition
error 001: expected token: ")", but found "return"
2nd problem:

pawn Код:
CPs[0] = CreateDynamicCP(-2141.4019,-256.8884,40.7195,-1,-1,-1,100.0); // Drugfactory rob CP
    CPs[1] = CreateDynamicCP(-1955.7079,306.0107,41.0471,-1,-1,-1,100.0); // WangCarsRobberyCPDoherty
    CPs[2] = CreateDynamicCP(-2051.8376,86.0918,28.3977,-1,-1,-1,100.0); // SanFierroFireDeptRobberyCP
Код:
warning 213: tag mismatch
warning 213: tag mismatch
warning 213: tag mismatch



Re: 2 problems - Dan_Barocu - 27.01.2012

1.problem i think like this..

Код:
if(!IsPlayerInRangeOfPoint(playerid, -1955.7682, 306.0241, 41.0471 && !IsPlayerInRangeOfPoint(playerid, 2051.8413,86.1440,28.3977) && !IsPlayerInRangeOfPoint(playerid, -2141.5591,-256.7738,40.7195)) return 1;
    return SendClientMessage(playerid, red, "You are not at a robbery location."); return 1;
   else return 0;
}
try it please.


Re: 2 problems - Face9000 - 27.01.2012

Nope,don't work.


Re: 2 problems - Dan_Barocu - 27.01.2012

are yousing it as an forward??


Re: 2 problems - Face9000 - 27.01.2012

No,i don't need to forward IsPlayerInRangeOfPoint,there is something wrong in that.


Re: 2 problems - [HK]Ryder[AN] - 27.01.2012

Sorry my bad


Re: 2 problems - Konstantinos - 27.01.2012

Quote:
Originally Posted by Dan_Barocu
Посмотреть сообщение
1.problem i think like this..

Код:
if(!IsPlayerInRangeOfPoint(playerid, -1955.7682, 306.0241, 41.0471 && !IsPlayerInRangeOfPoint(playerid, 2051.8413,86.1440,28.3977) && !IsPlayerInRangeOfPoint(playerid, -2141.5591,-256.7738,40.7195)) return 1;
    return SendClientMessage(playerid, red, "You are not at a robbery location."); return 1;
   else return 0;
}
try it please.
I suggest you, if you don't know what are you posting, don't post it at all
1st:
pawn Код:
if( !IsPlayerInRangeOfPoint( playerid, 7.0, -1955.7682, 306.0241, 41.0471 ) && !IsPlayerInRangeOfPoint( playerid, 7.0, -2051.8413, 86.1440, 28.3977 ) && !IsPlayerInRangeOfPoint( playerid, 7.0, -2141.5591, -256.7738, 40.7195 ) )
    return SendClientMessage( playerid, red, "You are not at a robbery location." );
You forgot the range on the parameters.

2nd:
it's
pawn Код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
You forgot the size


Re: 2 problems - Sasoft - 27.01.2012

EDIT: Nevermind.


Re: 2 problems - Konstantinos - 27.01.2012

I am curious to know if anyone read the wiki.
pawn Код:
IsPlayerInRangeOfPoint( playerid, Float:range, Float:x, Float:y, Float:z )
It's clearly the mistake of number of arguments does not match definition because it's missing the range. Has nothing to do with returning values.


Re: 2 problems - Face9000 - 27.01.2012

Quote:
Originally Posted by Dwane
Посмотреть сообщение
--
Thank you,always the best.