SA-MP Forums Archive
What #define a float? - 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: What #define a float? (/showthread.php?tid=491518)



What #define a float? - Syncro - 31.01.2014

What define a float?

Look...
Код:
// Fazioni
#define SERVIZIO_FBI 0,0,0
#define SERVIZIO_GOVERNO 0,0,0
#define SERVIZIO_POLIZIA 0,0,0
#define SERVIZIO_MEDICI 0,0,0
#define SERVIZIO_OFFICINA 0,0,0
#define SERVIZIO_TRASPORTI 0,0,0
#define SERVIZIO_NEWS 0,0,0
And...
Код:
if(PRESSED(KEY_SECONDARY_ATTACK))
	{
		// Servizio Fazioni
		if(IsPlayerInRangeOfPoint(playerid, SERVIZIO_FBI)) return 1;
	}
[Line: IsPlayerInRangeOfPoint etc] warning 202: number of arguments does not match definition


Re: What #define a float? - CuervO - 31.01.2014

Quote:
Originally Posted by Syncro
Посмотреть сообщение
What define a float?

Look...
Код:
// Fazioni
#define SERVIZIO_FBI 0,0,0
#define SERVIZIO_GOVERNO 0,0,0
#define SERVIZIO_POLIZIA 0,0,0
#define SERVIZIO_MEDICI 0,0,0
#define SERVIZIO_OFFICINA 0,0,0
#define SERVIZIO_TRASPORTI 0,0,0
#define SERVIZIO_NEWS 0,0,0
And...
Код:
if(PRESSED(KEY_SECONDARY_ATTACK))
	{
		// Servizio Fazioni
		if(IsPlayerInRangeOfPoint(playerid, SERVIZIO_FBI)) return 1;
	}
[Line: IsPlayerInRangeOfPoint etc] warning 202: number of arguments does not match definition
The function has five arguments, you're inputting 4. Effectively, you're missing the Z parameter according that code.

pawn Код:
IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);