Raised This Month: $32 Target: $400
 8% 

Run time error 3: stack error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-02-2013 , 11:38   Run time error 3: stack error
Reply With Quote #1

Hello,

In logs constantly spamming:

Code:
L 12/02/2013 - 17:33:21: [AMXX] Displaying debug trace (plugin "sw.amxx", version "3.2")
L 12/02/2013 - 17:33:21: [AMXX] Run time error 3: stack error 
L 12/02/2013 - 17:33:21: [AMXX]    [0] Untitled.sma::menu_chooseteam (line 3740)
L 12/02/2013 - 17:33:21: [AMXX]    [1] Untitled.sma::msg_show_menu (line 3733)
Line 3733:
Quote:
public msg_show_menu(msgid, dest, id) {
static team_select[] = "#Team_Select";
static menu_text_code[sizeof team_select];
get_msg_arg_string(4, menu_text_code, charsmax(menu_text_code));

if(!equal(menu_text_code, team_select)) return 0;

g_msgid[id] = msgid;
menu_chooseteam(id);
return 1;
}
]


Line 3400:
Quote:
public menu_chooseteam(id) {
if(!is_user_connected(id)) return 1;

new text[512], text2[512], len;
len += format(text[len], 511 - len, "\rChoose Team^n");
len += format(text[len], 511 - len, "\r1. \wTerrorist \r[%i]^n", all_tt);

if((all_ct && (all_ct * 6 >= all_tt))) format(text2, 511, "\r2. \wCTs \r[FULL]^n^n");
else format(text2, 511, "\r2. \wCTs \r[%i]^n^n", all_ct);

len += format(text[len], 511 - len, text2);
len += format(text[len], 511 - len, "\r6. \wSpectator^n^n");

if(iTeam[id]) len += format(text[len], 511 - len, "^n\r0. \wExit^n");

show_menu(id, iTeam[id] ? 0x223 : 0x23, text, -1, "mainmenu");
return 1;
}
Please help me

Last edited by OnePL; 12-02-2013 at 11:39. Reason: code -> quote
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
alan_el_more
Veteran Member
Join Date: Jul 2008
Location: amxmodx-es.com
Old 12-03-2013 , 09:38   Re: Run time error 3: stack error
Reply With Quote #2

Search
PHP Code:
#pragma dynamic 
__________________
alan_el_more is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-09-2013 , 02:24   Re: Run time error 3: stack error
Reply With Quote #3

Quote:
Originally Posted by alan_el_more View Post
Search
PHP Code:
#pragma dynamic 
What?

Error logs:
Code:
[AMXX] Run time error 3: stack error 
[AMXX]    [0] Untitled.sma::menu_chooseteam (line 104)
[AMXX]    [1] Untitled.sma::msg_show_menu (line 97)
Code:
PHP Code:
new iTeam[33], g_msgid[33
PHP Code:
    register_menucmd(register_menuid("mainmenu"), 0x223"_menu_chooseteam");
    
register_message(96"msg_show_menu"); 
PHP Code:
public menu_chooseteam(id) {
    if(!
is_user_connected(id)) return 1;

    new 
text[512], text2[512], len;
    
len += format(text[len], 511 len"\rChoose team^n");
    
len += format(text[len], 511 len"\r1. \wPrisoners \r[%i]^n"ile_graczy(1));

    if((
ile_graczy(2) && (ile_graczy(2) * >= ile_graczy(1)))) formatex(text2511"\r2. \wGuards \r[FULL]^n^n");
    else 
formatex(text2511"\r2. \wGuards \r[%i]^n^n"ile_graczy(2));

    
len += format(text[len], 511 lentext2);
    
len += format(text[len], 511 len"\r6. \wSpects^n^n");

    if(
iTeam[id]) len += format(text[len], 511 len"^n\r0. \wExit^n");

    
show_menu(idiTeam[id] ? 0x223 0x23text, -1"mainmenu");
    return 
1;

PHP Code:
public msg_show_menu(msgiddestid) {
    static 
team_select[] = "#Team_Select";
    static 
menu_text_code[sizeof team_select];
    
get_msg_arg_string(4menu_text_codesizeof menu_text_code 1);

    if(!
equal(menu_text_codeteam_select)) return 0;

    
g_msgid[id] = msgid;
    
menu_chooseteam(id);
    return 
1;

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-09-2013 , 09:15   Re: Run time error 3: stack error
Reply With Quote #4

Post the full code so we can figure out what line the error is pointing to
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-09-2013 , 11:36   Re: Run time error 3: stack error
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <colorchat>

#pragma semicolon 1

new iTeam[33], g_msgid[33], maxpl;

public 
plugin_init() {
    
register_clcmd("chooseteam""cmdChooseTeam");
    
register_menucmd(register_menuid("mainmenu"), 0x223"_menu_chooseteam");
    
register_message(96"msg_show_menu");
    
register_message(114"msg_vgui_menu");

    
RegisterHam(Ham_Spawn"player""Spawned"1);
    
maxpl get_maxplayers();
}

public 
Spawned(id) {
    if(!
is_user_alive(id)) return;

    
iTeam[id] = get_user_team(id) == 2;
}

public 
cmdChooseTeam(id) {
    
menu_chooseteam(id);
    return 
1;
}

public 
msg_vgui_menu(msgiddestid) {
    if(
get_msg_arg_int(1) != 2) return 0;

    
g_msgid[id] = msgid;
    
menu_chooseteam(id);
    return 
1;
}

public 
msg_show_menu(msgiddestid) {
    static 
team_select[] = "#Team_Select";
    static 
menu_text_code[sizeof team_select];
    
get_msg_arg_string(4menu_text_codesizeof menu_text_code 1);

    if(!
equal(menu_text_codeteam_select)) return 0;

    
g_msgid[id] = msgid;
    
menu_chooseteam(id);
    return 
1;
}

public 
menu_chooseteam(id) {
    if(!
is_user_connected(id)) return 1;

    new 
text[512], text2[512], len;
    
len += format(text[len], 511 len"\rChoose Team^n");
    
len += format(text[len], 511 len"\r1. \wPrisoners \r[%i]^n"sget_players(1));

    if((
sget_players(2) && (sget_players(2) * >= sget_players(1)))) formatex(text2511"\r2. \wGuards \r[FULL]^n^n");
    else 
formatex(text2511"\r2. \wGuards \r[%i]^n^n"sget_players(2));

    
len += format(text[len], 511 lentext2);
    
len += format(text[len], 511 len"\r6. \wSpects^n^n");

    if(
iTeam[id]) len += format(text[len], 511 len"^n\r0. \wExit^n");

    
show_menu(idiTeam[id] ? 0x223 0x23text, -1"mainmenu");
    return 
1;
}

public 
_menu_chooseteam(idkey) {
    switch(
key) {
        case 
015WhereJoin(idkey+1);
        case 
9: return 1;
    }
    return 
1;
}

WhereJoin(idteam) {
    
set_pdata_int(id125get_pdata_int(id125) & ~(1<<8));
    if(
team == 6) {    
        if(!
is_user_alive(id)) {
            
iTeam[id] = 0;
            
engclient_cmd(id"jointeam""6");
        }
        else 
client_print(idprint_center"You can not be spectator");

        return 
1;
    }
    if(
iTeam[id] == team) return 1;

    if(!
iTeam[id] && ((team == && sget_players(1)) || (team == && sget_players(2)))) {
        
ColorChat(idGREEN"[JailBreak]^x01 You can join the round will end!");
        
WhereJoin(id6);
        return 
1;
    }
    if(
team == 2) {
        if((
sget_players(2) && (sget_players(2) * >= sget_players(1)))) {
            
ColorChat(idGREEN"[JailBreak]^x01 Team CT full! Joined the prisoners!");
            return 
1;
        }
    }
    if(
iTeam[id] == team) return 1;

    new 
msg_blocke get_msg_block(g_msgid[id]);
    
set_msg_block(g_msgid[id], 2);
    
engclient_cmd(id"jointeam"team == "2" "1");

    
engclient_cmd(id"joinclass""1");
    
set_msg_block(g_msgid[id], msg_blocke);
    
iTeam[id] = team;
    return 
1;
}

public 
client_disconnect(idiTeam[id] = 0;

stock sget_players(team) {
    new 
ile;
    for(new 
1<= maxpli++)
        if(
is_user_connected(i) && get_user_team(i) == teamile++;

    return 
ile;

OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
Old 12-11-2013, 06:19
OnePL
This message has been deleted by YamiKaitou. Reason: Wait 14 days before you bump
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 12-26-2013 , 08:18   Re: Run time error 3: stack error
Reply With Quote #6

Bump
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
OnePL
BANNED
Join Date: May 2012
Location: GB
Old 01-31-2014 , 11:21   Re: Run time error 3: stack error
Reply With Quote #7

BUMP
OnePL is offline
Send a message via ICQ to OnePL Send a message via AIM to OnePL Send a message via Yahoo to OnePL Send a message via Skype™ to OnePL
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 23:36.


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