Raised This Month: $ Target: $400
 0% 

error help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cigojlo
Senior Member
Join Date: May 2013
Location: Serbia / Belgrade
Old 08-11-2013 , 04:29   error help
Reply With Quote #1

i have this eerror in logs, pls anyone help:
L 08/10/2013 - 04:597: [FUN] Invalid player 9
L 08/10/2013 - 04:597: [AMXX] Displaying debug trace (plugin "zp50_gameplay_fixes.amxx")
L 08/10/2013 - 04:597: [AMXX] Run time error 10: native error (native "set_user_health")
L 08/10/2013 - 04:597: [AMXX] [0] zp50_gameplay_fixes.sma::message_health (line 44
L 08/10/2013 - 09:47:10: Start of error session.

PHP Code:
// Fix for the HL engine bug when HP is multiples of 256
public message_health(msg_idmsg_destmsg_entity)
{
    
// Get player's health
    
new health get_msg_arg_int(1)
    
    
// Don't bother
    
if (health 256) return;
    
    
// Check if we need to fix it
    
if (health 256 == 0)
        
set_user_health(msg_entityget_user_health(msg_entity) + 1)
    
    
// HUD can only show as much as 255 hp
    
set_msg_arg_int(1get_msg_argtype(1), 255)

i saw on forum to add is_user_alive to prevent bug can i do this

PHP Code:
// Fix for the HL engine bug when HP is multiples of 256
public message_health(idmsg_idmsg_destmsg_entity)
{
    
// Get player's health
    
new health get_msg_arg_int(1)
    
    
// Don't bother
    
if (health 256) return;
    
    
// Check if we need to fix it
    
if (is_user_alive(id))
    if (
health 256 == 0)
        
set_user_health(msg_entityget_user_health(msg_entity) + 1)
    
    
// HUD can only show as much as 255 hp
    
set_msg_arg_int(1get_msg_argtype(1), 255)

__________________
Quote:
Originally Posted by ghinghis View Post
the fuking TOP.SMA cannot be compiled moron !!!!!
Cigojlo is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 08-11-2013 , 09:18   Re: error help
Reply With Quote #2

Yes, that should work.
Just change id to msg_entity
__________________

Last edited by Black Rose; 08-11-2013 at 09:21.
Black Rose is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode