Compiling won't stop or won't even move
hey guys please help me with this i know you guys are good at this.. the compiling of this .sma won't stop..it even won't move a thng..what this plugin does is it emits a low hp hearbeat when you have less hp and also displays a sprite when you have low hp.the sound and sprite will only be shown/hear to those who have less hp like 30..
heres the code PHP Code:
please guys i want this code to be fix and compiled without anything wrong.. |
Re: Compiling won't stop or won't even move
The reason it was hung while compiling was that you tried to give an array a non-integer size. Once you fix this it will give you a million errors.
|
Re: Compiling won't stop or won't even move
Quote:
|
Re: Compiling won't stop or won't even move
Remove the "new" before calling show_spr() and hide_spr(), "new" is for creating variables.
Also fix your "mw2lowhp" define, you forgot the " at the end. And another thing, I think you're lacking a } over there and you placed { instead of } at the end... it's hard to understand something when everything is randomly aligned, please indent your code. |
Re: Compiling won't stop or won't even move
Quote:
PHP Code:
|
Re: Compiling won't stop or won't even move
sorry for double post..but the compiling is still not moving or won't stop..and what is that integer stuff said by fysiks..can someone fix that part for me..I don't know anything about that..
|
Re: Compiling won't stop or won't even move
No.
This is indented and (quickly) fixed, untested. Code:
#include <amxmodx> Also, this: Code:
if(!(pev(id,pev_button) & FL_ONGROUND))You're also checking if player has above 25 hp twice... why ?! And don't use MSG_ONE for unimportant stuff like an icon, in laggy conditions the server would force itself to send that and could crash players... so just use MSG_ONE_UNRELIABLE for all non-important messages. EDIT: Out of curiousity I progresively removed and re-compiled your code, it seems that your float value size for array was the issue, so don't use float as variable array size ! |
Re: Compiling won't stop or won't even move
Quote:
thanks man..the .sma now is compiled and there is no error and I checked the code the the code..the line 36, 42, 45, 48, and 70 is an invalid function call, why is that?but compilation is fine..and is the showing of sprite still there? this sprite ..and thanks again man.. |
Re: Compiling won't stop or won't even move
and man..i really want my sprite to be loaded when you have low hp..and in the code :
write_string("dmg_rad"); // sprite name - can't be custom !!! so does that mean my sprite can't be loaded..that the sprite name can't be custom??.. i've seen lots of plugin that have their own sprite..pls.. man.. and in this line: public show_spr(id) { message_begin(MSG_ONE_UNRELIABLE, iconstatus, _, id) write_byte(1) // status (0=hide, 1=show, 2=flash) write_string("dmg_rad"); // sprite name - can't be custom !!! write_byte(255) // R write_byte(0) // G write_byte(0) // B message_end() } did you just replace my sprite with another one? PS: I haven't tested the plugin yet I just compile it see if there's something wrong..so I really don't know if my sprite is loaded.. |
Re: Compiling won't stop or won't even move
AFAIK statusicon's sprite can't be custom, you could just use a HUD message instead of that sprite because it's just a text.
Still, what plugins have their own HUD sprites that do not require clients to replace files on their game ? And what do you mean invalid call, who says that ? |
| All times are GMT -4. The time now is 04:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.