[HELP] Run time error 10 (cs_set_weapon_ammo)
Quote:
Code:
This function does what I want it to do but I get this error and I would like to know why. I'm not sure if the weapon entity index is set incorrectly or if the issue is that noone has a specific weapon. Thanks! |
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
http://www.amxmodx.org/api/engine/find_ent_by_owner
Code:
Code:
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
Quote:
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
Quote:
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
Honestly I have not seen anything informing to ignore this error on the site that Bugsy given to you...
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
Quote:
My plugin works without any issues, and I simply thought that it would return 0 if it didnt find any weapon entity. There was not much further explanation, I still don't know how to properly check if an entity exists.. Something like this? PHP Code:
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
That's right.
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
Quote:
|
Re: [HELP] Run time error 10 (cs_set_weapon_ammo)
You should not call find_ent_by_owner() redundantly like that. You are calling it once and storing the value in a variable, so you should reuse that in cs_set_weapon_ammo().
PHP Code:
|
All times are GMT -4. The time now is 17:02. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.