For Loop help - 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: For Loop help (
/showthread.php?tid=612286)
For Loop help -
Tass007 - 16.07.2016
Hi I'm new to for loops (trying it for the first time) and I'm getting warning 202: number of arguments does not match definition.
Line is
PHP код:
for(new i = 1; i != 311; i++) AddPlayerClass(i, -1968.9745,137.8568,27.6875,88.8534, 0,0, 0, 0, 0);
I know that my AddPlayerClass is correct so it's something within my loop but I'm not quite sure.
As always person whom offers to help will get +1 Rep.
Thanks for your time.
Re: For Loop help -
Stinged - 16.07.2016
Actually AddPlayerClass is incorrect, there's nothing wrong with the loop.
Add a zero to the end. It's supposed to be:
Код:
AddPlayerClass(skinid, x, y, z, a, weapon_1, ammo_1, weapon_2, ammo_2, weapon_3, ammo_3);
Re: For Loop help -
Sawalha - 16.07.2016
you forgot the last parameter of weapon3's ammo in AddPlayerClass function
edit: too late
Re: For Loop help -
Konstantinos - 16.07.2016
This warning is shown to functions only, for loop has nothing to do with it. It is actually not correct, you are missing 1 parameter (weapon3_ammo).
Re: For Loop help -
Tass007 - 16.07.2016
Quote:
Originally Posted by Sawalha
you forgot the last parameter of weapon3's ammo in AddPlayerClass function
edit: too late 
|
Quote:
Originally Posted by Stinged
Actually AddPlayerClass is incorrect, there's nothing wrong with the loop.
Add a zero to the end. It's supposed to be:
Код:
AddPlayerClass(skinid, x, y, z, a, weapon_1, ammo_1, weapon_2, ammo_2, weapon_3, ammo_3);
|
Awesome thanks guys. SOLVED!