Raised This Month: $ Target: $400
 0% 

HELP Run time error 3. [Error With Log]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
twiister
Senior Member
Join Date: Mar 2013
Location: Argentina
Old 05-11-2014 , 14:48   HELP Run time error 3. [Error With Log]
Reply With Quote #1

Hello, my server giving this error

Error:

Code:
Start of error session.
Info (map "de_dust2") (file "addons/amxmodx/logs/error_20140509.log")
[AMXX] Displaying debug trace (plugin "ASD.amxx")
[AMXX] Run time error 3: stack error

PHP Code:
#include <amxmodx> 
#include <cstrike>

#define PLUGIN "ASD"
#define VERSION "1.1"
#define AUTHOR "Tutor"

new cvar_block_w

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("CurWeapon""Event_CurWeapon""be""1=1"

    
cvar_block_w register_cvar("block_plugin""0")



public 
Event_CurWeapon(id

    if(!
is_user_alive(id) || !get_pcvar_num(cvar_block_bot)) return PLUGIN_HANDLED
         
    
new temp[2], weapon get_user_weapon(idtemp[0], temp[1]) 
    if( (
weapon == CSW_G3SG1) || (weapon == CSW_SG550) || (weapon == CSW_M3) || (weapon == CSW_XM1014) || (weapon == CSW_TMP) || (weapon == CSW_P90) || (weapon == CSW_MAC10) || (weapon == CSW_UMP45) || (weapon == CSW_SG552) || (weapon == CSW_AUG) || (weapon == CSW_M249) || (weapon == CSW_ELITE) ) 
    { 
        
engclient_cmd(id"drop""weapon_sg550"
        
engclient_cmd(id"drop""weapon_g3sg1"
        
engclient_cmd(id"drop""weapon_m3")
        
engclient_cmd(id"drop""weapon_xm1014"
        
engclient_cmd(id"drop""weapon_tmp"
        
engclient_cmd(id"drop""weapon_p90")
        
engclient_cmd(id"drop""weapon_mac10"
        
engclient_cmd(id"drop""weapon_ump45"
        
engclient_cmd(id"drop""weapon_sg552"
        
engclient_cmd(id"drop""weapon_aug"
        
engclient_cmd(id"drop""weapon_m249"
        
engclient_cmd(id"drop""weapon_elite"

    } 
    return 
PLUGIN_HANDLED

twiister is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 05-11-2014 , 17:56   Re: HELP Run time error 3. [Error With Log]
Reply With Quote #2

Edit: Stupid me...
Code:
new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
->
Code:
static temp, weapon weapon = get_user_weapon(id, temp, temp)

It would probably be better to use Ham natives, but that's more advanced.
__________________

Last edited by Black Rose; 05-12-2014 at 13:02.
Black Rose is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-12-2014 , 01:43   Re: HELP Run time error 3. [Error With Log]
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
Code:
new temp[2], weapon = get_user_weapon(id, temp[0], temp[1])
->
Code:
static temp[2], weapon get_user_weapon(id, temp[0], temp[1])

It would probably be better to use Ham natives, but that's more advanced.
You forgot to assign the weapon variable.
__________________
fysiks 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 09:40.


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