AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   runtime error 3: stack error (https://forums.alliedmods.net/showthread.php?t=56575)

Rolnaaba 06-16-2007 12:28

runtime error 3: stack error
 
1 Attachment(s)
I keep getting this error repeatedly, then the server crashes :/

this is error log with debug mode enabled.
Code:

L 06/16/2007 - 11:24:10: Start of error session.
L 06/16/2007 - 11:24:10: Info (map "de_dust2") (logfile "error_061607.log")
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error
L 06/16/2007 - 11:24:10: [AMXX] Displaying debug trace (plugin "SewerMonster.amxx")
L 06/16/2007 - 11:24:10: [AMXX] Run time error 3: stack error

here is my source

Sylwester 06-16-2007 16:58

Re: runtime error 3: stack error
 
Its caused by strip_user_weapons(id) used in Event_CurWeapon when round restart occurs. I fixed it this way:

PHP Code:

public Event_CurWeapon(id) {
    if(!
get_pcvar_num(pcvar[CMOD])) return PLUGIN_CONTINUE;

    if(
id != monster) return PLUGIN_CONTINUE;
    
    
set_user_maxspeed(idget_user_maxspeed(id)+get_pcvar_float(pcvar[CSPEED]));
    
    new 
wpnid read_data(2);
    if(
wpnid != CSW_KNIFE) {
        
set_task(0.1"strip_weaps"id)

        
//entity_set_string(monster, EV_SZ_viewmodel, "models/player/monster/v_claws.mdl");
    
}
    return 
PLUGIN_CONTINUE;
}

public 
strip_weaps(id){
    
strip_user_weapons(id);
    
give_item(id"weapon_knife");


but there may be better way to make it.

Also this:
PHP Code:

public client_putinserver(id) {
    if(!
get_pcvar_num(pcvar[CMOD])) return PLUGIN_CONTINUE;

    
cs_set_user_team(idCS_TEAM_CTCS_CT_GIGN);

    return 
PLUGIN_CONTINUE;


makes server crash when I try to add bot.

Rolnaaba 06-16-2007 22:32

Re: runtime error 3: stack error
 
ok thanks I will see what I can do thanks.
Client putin server is called when a client chooses a team correct? If not how can I hook their team choosing?

Lee 06-16-2007 22:44

Re: runtime error 3: stack error
 
No.

Quote:

Originally Posted by arkshine (Post 488762)
Code:
register_event( "TeamInfo", "event_team_info", "a" ); public event_team_info() {     new id = read_data( 1 );             new team[12];     read_data( 2, team, sizeof team - 1 );         switch( team[0] )     {         case 'C' :  // CT         case 'T' :  // TERRORIST         case 'S' :  // SPECTATOR     } }


teame06 06-16-2007 22:44

Re: runtime error 3: stack error
 
Quote:

Originally Posted by Rolnaaba (Post 490925)
ok thanks I will see what I can do thanks.
Client putin server is called when a client chooses a team correct? If not how can I hook their team choosing?

client_putinserver is called when the client join ingame. Right before the client screen is initialize.

Rolnaaba 06-16-2007 22:53

Re: runtime error 3: stack error
 
ok well I changed to this:
Code:
public Event_CurWeapon(id) {     if(!get_pcvar_num(pcvar[CMOD])) return PLUGIN_CONTINUE;         if(id != monster) return PLUGIN_CONTINUE;         set_user_maxspeed(id, get_user_maxspeed(id)+get_pcvar_float(pcvar[CSPEED]));         new wpnid = read_data(2);         if(wpnid != CSW_KNIFE) {         set_task(0.1, "strip_weaps", id)         give_item(id, "weapon_knife");         //entity_set_string(monster, EV_SZ_viewmodel, "models/player/monster/v_claws.mdl");     }     return PLUGIN_CONTINUE; } public strip_weaps(id){     strip_user_weapons(id);     give_item(id, "weapon_knife"); }

and commented out this:
Code:
/* public client_putinserver(id) {     if(!get_pcvar_num(pcvar[CMOD])) return PLUGIN_CONTINUE;         cs_set_user_team(id, CS_TEAM_CT, CS_CT_GIGN);         return PLUGIN_CONTINUE; } */
and I am still getting the error...

teame06 06-17-2007 02:11

Re: runtime error 3: stack error
 
@Rolnaaba

Are you just trying to force the monster(client) to only used knife?

Sylwester 06-17-2007 05:38

Re: runtime error 3: stack error
 
PHP Code:

public Event_CurWeapon(id) {
    if(!
get_pcvar_num(pcvar[CMOD])) return PLUGIN_CONTINUE;

    if(
id != monster) return PLUGIN_CONTINUE;
    
    
set_user_maxspeed(idget_user_maxspeed(id)+get_pcvar_float(pcvar[CSPEED]));

    new 
WeaponActive read_data(1);
    new 
wpnid read_data(2);

    if (!
WeaponActive)
        return 
PLUGIN_CONTINUE;
        
    if(
wpnid != CSW_KNIFE) {
        
strip_user_weapons(id);
        
give_item(id"weapon_knife");
        
//entity_set_string(monster, EV_SZ_viewmodel, "models/player/monster/v_claws.mdl");
    
}

    return 
PLUGIN_CONTINUE;



Rolnaaba 06-17-2007 10:49

Re: runtime error 3: stack error
 
Quote:

Originally Posted by teame06 (Post 491008)
@Rolnaaba

Are you just trying to force the monster(client) to only used knife?

exactly

Alka 06-17-2007 10:51

Re: runtime error 3: stack error
 
1 Attachment(s)
Hm...i make something like this with fakemeta!
:wink:

@Sylwester - That is not a good way...will make lag,also inefficient


EDIT:I think you can buy nades!So you can make something different!
Register player_prethink....and put a simple command "engclient_cmd(id,"weapon_knife")" :P


All times are GMT -4. The time now is 10:30.

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