Raised This Month: $51 Target: $400
 12% 

Function doesnt get called


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 21:06   Function doesnt get called
Reply With Quote #1

Hey, I built a function that is called, but for some wierd reason after it is called (and im sure it is called cuz i did a client_print to see if it reaches there) it never calls the function StartMatch(), why is that??
Here is the code:

PHP Code:
public CurrentTeams()
{
    new 
players[32], pnumtempid;  
      
    
get_players(playerspnum"ch"); 
        
    for( new 
ii<pnumi++ )  
    {  
        if (
cs_get_user_team(tempid) == CS_TEAM_SPECTATOR)
        {
            
MoveFromSpec(tempid)
        }
    }
    
    
StartMatch()
}


public 
MoveFromSpec(id)
{
    new 
players[32], pnumtempid;  
    new 
tteamctteam
      
    get_players
(playerspnum"ch"); 
        
    for( new 
ii<pnumi++ )  
    {  
        
tempid players[i];  
        if (
cs_get_user_team(tempid) == CS_TEAM_T
        { 
            
tteam++
        }
        
        else if(
cs_get_user_team(tempid) == CS_TEAM_CT)
        {
            
ctteam++
        }
    } 
    
    if (
tteam ctteam)
    {
        
cs_set_user_team(idCS_TEAM_CT)
    }
    
    else if (
ctteam >= tteam)
    {
        
cs_set_user_team(idCS_TEAM_T)
    }

Diegorkable is offline
wrecked_
Veteran Member
Join Date: Jan 2010
Location: New York (GMT-5)
Old 07-23-2011 , 21:08   Re: Function doesnt get called
Reply With Quote #2

Show us your StartMatch() function and re-place the client_print() messages that you had.
__________________
[ Paid Requests ]
DO NOT PM ME ABOUT BLOCKMAKER
NO PRIVATE SUPPORT
wrecked_ is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-24-2011 , 06:06   Re: Function doesnt get called
Reply With Quote #3

All that StartMatch does is print 3 messages then set task to another function. It isnt something wrong with StartMatch() since i would have seen the messages getting printed, can you tell me if you see anything wrong in the code i posted?
Diegorkable is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-24-2011 , 06:19   Re: Function doesnt get called
Reply With Quote #4

Nvm, it works i fixed it.
Diegorkable 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 22:45.


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