Run time error 11: divide
[AMXX] Run time error 11: divide
[AMXX] [0] amx_fire.sma::fire_flamethrower (line 179) 179 line is: PHP Code:
PHP Code:
|
Re: Run time error 11: divide
It is simple math. You have multiplication and dividing in one expression. Just put some brackets () on the multiplication or in the dividing. Depends of what you want but in this case I think you should put the multiplication expression in the brackets.
|
Re: Run time error 11: divide
Hm can u give me example?
|
Re: Run time error 11: divide
PHP Code:
PHP Code:
|
Re: Run time error 11: divide
Thx for help, this means if u dont follow math rules in dividing u will get error!
|
Re: Run time error 11: divide
I think it's because you're dividing by 0.
|
Re: Run time error 11: divide
Quote:
However, one major flaw here is that the variables are not floating point variables which will result in integer division. This is occasionally beneficial but not in this case. The sqrt() outputs a floating point value but "length" is not floating point. The error is probably occurring from a division by zero. |
Re: Run time error 11: divide
Quote:
|
Re: Run time error 11: divide
Then, you should not divide by 0.
|
Re: Run time error 11: divide
Quote:
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 21:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.