Raised This Month: $ Target: $400
 0% 

Checking teams error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Gadzislaw007
Senior Member
Join Date: Nov 2009
Old 11-17-2010 , 08:52   Checking teams error
Reply With Quote #1

PHP Code:
public client_connect(id)
{
    
champion[id] = random_num(0,15)
    
    
check_champion(id)
}

[...]

public 
check_champion(id)
{
    for (new 
132i++)
    {
        if(
is_user_connected(i) && != id)
        {
            new 
name1[32], name2[32]
            
get_user_name(iname1charsmax(name1))
            
get_user_name(idname2charsmax(name2))

            new 
CsTeams:userTeam cs_get_user_team(id)
            new 
CsTeams:oppTeam cs_get_user_team(i)

            if(
userTeam == oppTeam)
            {
                
                if(
champion[id] == champion[i])
                {
                
                
champion[id] = random_num(0,15)
                
check_champion(id)
                }
    
            }


        }
    }
}

[...] 
Code:
[P*D]Pseudolukian (97) connected
[P*D]Pseudolukian (97) is joining the Terrorist force
L 11/17/2010 - 14:42:03: [CSTRIKE] Invalid player 6
L 11/17/2010 - 14:42:03: [AMXX] Displaying debug trace (plugin "z_League.amxx")
L 11/17/2010 - 14:42:03: [AMXX] Run time error 10: native error (native "cs_get_user_team")
L 11/17/2010 - 14:42:03: [AMXX]    [0] z_League.sma::check_champion (line 156)
L 11/17/2010 - 14:42:03: [AMXX]    [1] z_League.sma::client_connect (line 99)
line 99 is check_champion(id)
line 156 is if(userTeam == oppTeam)

Everything in check_champion what's before line 156 is working.

Any ideas, what's wrong?
Gadzislaw007 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:19.


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