Raised This Month: $ Target: $400
 0% 

Runtime Error (assistance needed)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
makiza
BANNED
Join Date: Mar 2009
Old 03-12-2011 , 12:15   Runtime Error (assistance needed)
Reply With Quote #1

hello there...

Well, while i'm running this plugin fails and comes out this:
Quote:
L 03/12/2011 - 10:24:13: [AMXX] Run time error 4 (plugin "zombie_plague40.amxx") - debug not enabled!
L 03/12/2011 - 10:24:13: [AMXX] To enable debug mode, add "debug" after the plugin name in plugins.ini (without quotes).
L 03/12/2011 - 10:24:13: Unhandled dynamic native error
L 03/12/2011 - 10:24:13: [AMXX] Displaying debug trace (plugin "ZP_EMP.amxx")
L 03/12/2011 - 10:24:13: [AMXX] Run time error 10: native error (native "zp_get_user_zombie")
L 03/12/2011 - 10:24:13: [AMXX] [0] ZP_EMP.sma::emp_start (line 70)
this is the part of the code where the error is:
PHP Code:
public emp_start(id)
{       
    if(
zp_get_user_zombie(id))
        return 
PLUGIN_HANDLED;
    
    
server_cmd("mp_flashlight 0")
    
server_cmd("zp_triggered_lights 0")
    
server_cmd("zp_nvg_hum_color_R 0")
    
server_cmd("zp_nvg_hum_color_G 0")
    
server_cmd("zp_nvg_hum_color_B 0")
    
server_cmd("zp_flare_duration 0")
    
server_cmd("zp_flare_size 0")   
    
server_cmd("zp_lighting a")
    
client_cmd(0"hud_draw 0")
    
server_cmd("sv_voiceenable 0")
    
client_cmd(0"crosshair 0")
    
client_cmd(0"spk sound/weapons/c4_explode1.wav");
    
client_cmd(0"spk sound/fvox/hev_shutdown.wav");
    
set_task(30.0"emp_end"TASK_EMP);
    return 
PLUGIN_CONTINUE;

can you help me with this, and post a link where i can learn how to make conditionals (if, else ,else if) and how to return some data (PLUGIN_HANDLED/CONTINUE) properly?

thanks in advance

Last edited by makiza; 03-12-2011 at 12:19.
makiza is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 03-12-2011 , 12:43   Re: Runtime Error (assistance needed)
Reply With Quote #2

Run time error 10: It means the player is not more connected when the command is executed. You would need to check if user is connected.
__________________

Working on:
nothing
schmurgel1983 is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-12-2011 , 14:53   Re: Runtime Error (assistance needed)
Reply With Quote #3

Quote:
Originally Posted by schmurgel1983 View Post
Run time error 10: It means the player is not more connected when the command is executed. You would need to check if user is connected.
The error says nothing about an invalid player.
The unhandled dynamic native error is something in the zp_get_user_zombie() code that is breaking it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
makiza
BANNED
Join Date: Mar 2009
Old 03-12-2011 , 15:05   Re: Runtime Error (assistance needed)
Reply With Quote #4

PHP Code:
if((zp_get_user_zombie(id) && is_user_connected(id)))
        return 
PLUGIN_HANDLED
The same result.

Quote:
Originally Posted by Exolent[jNr] View Post
The error says nothing about an invalid player.
The unhandled dynamic native error is something in the zp_get_user_zombie() code that is breaking it.
how can be possible since that is the only function that uses zp_get_user_zombie() native?

Last edited by makiza; 03-12-2011 at 15:19.
makiza is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-12-2011 , 15:47   Re: Runtime Error (assistance needed)
Reply With Quote #5

Quote:
Originally Posted by makiza View Post
how can be possible since that is the only function that uses zp_get_user_zombie() native?
It's not your code. There's something wrong in that functions code, not your call to it.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
makiza
BANNED
Join Date: Mar 2009
Old 03-12-2011 , 17:08   Re: Runtime Error (assistance needed)
Reply With Quote #6

Okay, i tried this:
PHP Code:
public emp_start(id)
{           
    switch( 
get_user_team(id) )
    {
        case 
1:
        {
            
server_cmd("mp_flashlight 1")
            
server_cmd("zp_triggered_lights 1")
            
server_cmd("zp_nvg_hum_color_R 100")
            
server_cmd("zp_nvg_hum_color_G 100")
            
server_cmd("zp_nvg_hum_color_B 100")
            
server_cmd("zp_flare_duration 60")
            
server_cmd("zp_flare_size 25")
            
server_cmd("zp_lighting b")
            
client_cmd(0"hud_draw 1")
            
server_cmd("sv_voiceenable 1")
            
client_cmd(0"crosshair 1")
        }
        case 
2:
        {
            
server_cmd("mp_flashlight 0")
            
server_cmd("zp_triggered_lights 0")
            
server_cmd("zp_nvg_hum_color_R 0")
            
server_cmd("zp_nvg_hum_color_G 0")
            
server_cmd("zp_nvg_hum_color_B 0")
            
server_cmd("zp_flare_duration 0")
            
server_cmd("zp_flare_size 0")   
            
server_cmd("zp_lighting a")
            
client_cmd(0"hud_draw 0")
            
server_cmd("sv_voiceenable 0")
            
client_cmd(0"crosshair 0")
            
client_cmd(0"spk sound/weapons/c4_explode1.wav");
            
client_cmd(0"spk sound/fvox/hev_shutdown.wav");
            
//set_task(30.0, "emp_end", TASK_EMP);
        
}
    }  
    
set_task(30.0"emp_end"TASK_EMP); 
but only the task makes effect? what could be wrong with this?

Last edited by makiza; 03-12-2011 at 17:15.
makiza is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 03-13-2011 , 01:57   Re: Runtime Error (assistance needed)
Reply With Quote #7

what is TASK_EMP?
__________________

Working on:
nothing
schmurgel1983 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 14:36.


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