Run Time Error
Well I'm trying to make a command where any player in the server can open the console and type 'mslap <number of slaps >' and it will slap them according to the amount of slaps they output.
Code : Code:
Compiles with no errors or warnings. but I do get a run time error on this line : Code:
Code:
L 03/10/2005 - 20:42:19: [AMXX] Run time error 4 (index out of bounds) on line 59 (file "mult_self_slap.sma"). |
Code:
|
Just had to comment on this one: "-0" -- rofl.
Xeroblood gave you the fixed code, I just thought I'd tell you why it didn't work. When the user runs the command it sends one integer parameter to the function which is the ID of the player. However, you designed your function to accept an array and then you attempt to get the ID of the player from the first array index. Obviously this wouldn't work. It looks like the function you had had been intended for set_task passing an array. |
ah, I see what I did wrong. xero, avalanche, ty.
|
| All times are GMT -4. The time now is 13:59. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.