Raised This Month: $ Target: $400
 0% 

I get access violation on function mp!CountTeamPlayers


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
01101101
BANNED
Join Date: Nov 2009
Location: 9`su 09`n0n7e`r0f76a
Old 12-01-2010 , 08:39   I get access violation on function mp!CountTeamPlayers
Reply With Quote #1

Code:
function: mp!CountTeamPlayers
        06d53c42 0000             add     [eax],al
        06d53c44 85c9             test    ecx,ecx
        06d53c46 750a             jnz     mp!CountTeamPlayers+0xa7f2 (06d53c52)
        06d53c48 85ff             test    edi,edi
        06d53c4a 7506             jnz     mp!CountTeamPlayers+0xa7f2 (06d53c52)
        06d53c4c 89ab94010000     mov     [ebx+0x194],ebp
        06d53c52 8b8ed4050000     mov     ecx,[esi+0x5d4]
        06d53c58 85c9             test    ecx,ecx
        06d53c5a 7460             jz      mp!CountTeamPlayers+0xa85c (06d53cbc)
        06d53c5c 8b11             mov     edx,[ecx]
FAULT ->06d53c5e ff9234010000    call dword ptr [edx+0x134] ds:0023:00000134=????????
        06d53c64 8be8             mov     ebp,eax
        06d53c66 85ed             test    ebp,ebp
        06d53c68 7452             jz      mp!CountTeamPlayers+0xa85c (06d53cbc)
        06d53c6a 8b4500           mov     eax,[ebp]
        06d53c6d 8bcd             mov     ecx,ebp
        06d53c6f ff9074010000     call    dword ptr [eax+0x174]
        06d53c75 85c0             test    eax,eax
        06d53c77 7443             jz      mp!CountTeamPlayers+0xa85c (06d53cbc)
        06d53c79 8b5500           mov     edx,[ebp]
        06d53c7c b90b000000       mov     ecx,0xb

*----> Stack Back Trace <----*
ChildEBP RetAddr  Args to Child              
00000001 00000000 00000000 00000000 00000000 mp!CountTeamPlayers+0xa7fe
What code might be causing that/how can I fix it?

Code I have related to Teams:

PHP Code:

    g_msgTeamInfo 
get_user_msgid("TeamInfo"
PHP Code:
    register_message(get_user_msgid("TeamScore"), "message_teamscore")
    
register_message(g_msgTeamInfo"message_teaminfo")
    
register_message(get_user_msgid("VGUIMenu"), "message_vgui_menu")
    
register_message(get_user_msgid("ShowMenu"), "msgShowMenu"
PHP Code:
        get_user_team(attackerteamm9); 
PHP Code:
// Block Team Change
public clcmd_changeteam(id)
{
    static 
team
    team 
fm_get_user_team(id)
    
    
// Unless it's a spectator joining the game
    
if (team == CS_TEAM_SPECTATOR || team == CS_TEAM_UNASSIGNED)
    {
        if (!
g_isreg[id])
        {
            
show_menu_entrance(id)
            return 
PLUGIN_HANDLED;
        }
        else
        return 
PLUGIN_CONTINUE
    
}    
    
// Pressing 'M' (chooseteam) ingame should show the main menu instead
    
show_menu_game(id)
    return 
PLUGIN_HANDLED;


PHP Code:
stock fm_user_team_update(id)
{
    static 
Float:current_time
    current_time 
get_gametime()

    if (
current_time g_teams_targettime >= 0.1)
    {
        
set_task(0.1"fm_set_user_team_msg"id+TASK_TEAM)
        
g_teams_targettime current_time 0.1
    
}
    else
    {
        
set_task(((g_teams_targettime 0.1) - current_time), "fm_set_user_team_msg"id+TASK_TEAM)
        
g_teams_targettime g_teams_targettime 0.1
    
}

PHP Code:
// Send User Team Message
public fm_set_user_team_msg(taskid)
{
    
// Beware: this message can now be picked up by other metamod
    // plugins (yeah, that includes AMXX plugins as well)

    // Set the switching team flag
    
g_switchingteam[ID_TEAM] = true

    
// Tell everyone my new team
    
emessage_begin(MSG_ALLg_msgTeamInfo)
    
ewrite_byte(ID_TEAM// player
    
ewrite_string(TEAMNAMES[fm_get_user_team(ID_TEAM)]) // team
    
emessage_end()

    
// Done switching team
    
g_switchingteam[ID_TEAM] = false

PHP Code:
public message_vgui_menu(msgiddestid)
{
    if(
get_msg_arg_int(1) != TEAM_SELECT_VGUI_MENU_ID)
        return 
PLUGIN_CONTINUE

    
if(g_islog[id])
    {
        
set_task(0.2"show_menu_chars"id)
    }
    else
    {
        
set_task(0.3"show_menu_entrance" ,id)
    }
    return 
PLUGIN_HANDLED;

PHP Code:
public msgShowMenu(msgiddestid)
{
    new 
sTemp[sizeof(g_sTeamSelect)+1]
    
get_msg_arg_string(4sTempsizeof(sTemp) - 1)
        
    if(
equal(sTempg_sTeamSelect))
    {
        if (
g_islog[id])
        {
            
set_task(0.2"show_menu_chars"id)
            
show_menu_entrance(id)
            return 
PLUGIN_HANDLED;
        }
        else
        {
            
set_task(0.3"show_menu_entrance" ,id)
            return 
PLUGIN_HANDLED;
        }

    }
    return 
PLUGIN_CONTINUE

PHP Code:
        set_msg_block(122BLOCK_SET)
        
engclient_cmd(id"jointeam""5")
        
engclient_cmd(id"joinclass""0")
        
set_msg_block(122msg_block

Last edited by 01101101; 12-01-2010 at 08:49.
01101101 is offline
 



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 11:27.


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