SA-MP Forums Archive
Randomly "number of arguments does not match definition" when I try to compile - 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: Randomly "number of arguments does not match definition" when I try to compile (/showthread.php?tid=430443)



Randomly "number of arguments does not match definition" when I try to compile - Spose - 13.04.2013

Hello. Whenever I try to change something, for example something simple like the price on a Desert Eagle in the gun store or just changing the color when you do /admins, I suddenly get like 50 of these "number of arguments does not match definition" which I've never gotten before when I've compiled. Why does this happen, how do I solve this? It won't compile now.

Thanks in advance,
Spose.


Re: Randomly "number of arguments does not match definition" when I try to compile - Scrillex - 13.04.2013

maybe show the code...... So we could help you out...

It could be colors... I had the same thing... like
#define COLOR_MINE {sasadas}

It went out as error!
So it's hard to tell what is wrong with it knowing really what could be the isue!


Re: Randomly "number of arguments does not match definition" when I try to compile - Spose - 13.04.2013

Код:
(36781) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -22.1155,-138.6256,1003.5469,181.4655))
(36785) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -27.5109,-56.5980,1003.5469,2.0210))
(36789) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -27.1212,-55.7527,1003.5469,46.7321))
(36793) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -26.6916,-55.7149,1003.5469,316.7321))
(36797) : warning 202: number of arguments does not match definition >			else if (PlayerToPoint(5.0, i, -27.3484,-57.5402,1003.5469,316.7321))
(36801) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -25.7326,-187.8170,1003.5469,316.7321))
(36805) : warning 202: number of arguments does not match definition >
(38317) : warning 202: number of arguments does not match definition > 			else if (PlayerToPoint(5.0, i, -26.1135,-186.2073,1003.5469,1.3709))
(38317) : warning 202: number of arguments does not match definition >		else if(PlayerToPoint(6.0,playerid,2634.2598,-2097.8589,13.1189,357.2364) || PlayerToPoint(6.0,playerid,2634.0376,-2085.6094,13.1104,1.2890))
(38321) : warning 202: number of arguments does not match definition >		else if(PlayerToPoint(6.0,playerid,2641.8901,-2085.1936,13.1079,180.5394) || PlayerToPoint(6.0,playerid,2641.9946,-2096.3113,13.1189,180.5396))
(38325) : warning 202: number of arguments does not match definition > 		else if(PlayerToPoint(6.0,playerid,2140.6028,-1740.5513,13.1274,272.8602) || PlayerToPoint(6.0,playerid,2154.2971,-1740.2750,13.1211,269.9246))







Re: Randomly "number of arguments does not match definition" when I try to compile - andrewgrob - 13.04.2013

add ; on the end of each one


Re: Randomly "number of arguments does not match definition" when I try to compile - Spose - 13.04.2013

Quote:
Originally Posted by andrewgrob
Посмотреть сообщение
add ; on the end of each one
Код:
(38329) : warning 225: unreachable code
(38329) : error 029: invalid expression, assumed zero
(38329) : warning 215: expression has no effect
(38329) : error 001: expected token: ";", but found "if"



Re: Randomly "number of arguments does not match definition" when I try to compile - Vince - 13.04.2013

Use IsPlayerInRangeOfPoint, instead of some outdated contraption.


Re: Randomly "number of arguments does not match definition" when I try to compile - Spose - 13.04.2013

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use IsPlayerInRangeOfPoint, instead of some outdated contraption.
Quote:
Originally Posted by wiki.sa-mp.com
This function was added in SA-MP 0.3a and will not work in earlier versions!
Lol
Didn't work though.

And I want it to work with this, oldschool is better and it has worked all the way until now when I changed the prices of guns.


Re: Randomly "number of arguments does not match definition" when I try to compile - Vince - 13.04.2013

And PlayerToPoint is a scripted function (and thus slower than a native function) that was used as far back as 0.1. Don't try to outsmart me, kid.


Re: Randomly "number of arguments does not match definition" when I try to compile - Spose - 13.04.2013

However, I don't want to have to change all that, I want it to work with what I've always used. How do I do to proceed?