Raised This Month: $ Target: $400
 0% 

Undefined Symbol


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 05-10-2010 , 07:11   Undefined Symbol
Reply With Quote #1

PHP Code:
public resultsOfVote(tid){
 
gbVote=false;
 
 new 
giVotesOn=count(VOTE_ON);
 new 
giVotesOff=count(VOTE_OFF);
 
 
ColorChat(0,GREEN"[FreeRun]^x01 %L %L(%d) vs %L(%d)",LANG_SERVER,"FREERUN_RESULTS",LANG_SERVER,"YES",giVotesOn,LANG_SERVER,"NO"giVotesOff);
 
 if( 
giVotesOn == giVotesOff ){
  
ColorChat(0,GREEN"[FreeRun]^x01 %L",LANG_SERVER,"FREERUN_TIE");
  return;
 }
 
makeFreeRun((giVotesOn giVotesOff));
 
ColorChat(0,GREEN"[FreeRun]^x01 %L ^x03%L",LANG_SERVER,"FREERUN_WINOPTION",LANG_SERVERgbFreeRun?"YES":"NO");
}
makeFreeRun(bool:bFR=true){
 
gbFreeRun=bFR;
 
reset();
 
giRounds=0;
 
giTime=get_systime();
 
 if(
gbFreeRun){
  
set_hudmessage(02552550.02, -1.0);
  
show_hudmessage(0"FreeRun!");
  if (
is_user_aliveiPlayer )  &&  cs_get_user_teamiPlayer ) == CS_TEAM_T )
       {
     new 
iPlayers32 ], iNum;
            
get_playersiPlayersiNum"ae""CT" );
             for( new 
0iNumi++ )
              {
                   
StripWeaponsiPlayers] );
              }
      }
                 }
 

Where always undefined symbol "iPlayer"
I made this
PHP Code:
public resultsOfVote(tid,iPlayer){
 
gbVote=false;
 
 new 
giVotesOn=count(VOTE_ON);
 new 
giVotesOff=count(VOTE_OFF);
 
 
ColorChat(0,GREEN"[FreeRun]^x01 %L %L(%d) vs %L(%d)",LANG_SERVER,"FREERUN_RESULTS",LANG_SERVER,"YES",giVotesOn,LANG_SERVER,"NO"giVotesOff);
 
 if( 
giVotesOn == giVotesOff ){
  
ColorChat(0,GREEN"[FreeRun]^x01 %L",LANG_SERVER,"FREERUN_TIE");
  return;
 }
 
makeFreeRun((giVotesOn giVotesOff));
 
ColorChat(0,GREEN"[FreeRun]^x01 %L ^x03%L",LANG_SERVER,"FREERUN_WINOPTION",LANG_SERVERgbFreeRun?"YES":"NO");
}
makeFreeRun(bool:bFR=true){
 
gbFreeRun=bFR;
 
reset();
 
giRounds=0;
 
giTime=get_systime();
 
 if(
gbFreeRun){
  
set_hudmessage(02552550.02, -1.0);
  
show_hudmessage(0"FreeRun!");
  if (
is_user_aliveiPlayer )  &&  cs_get_user_teamiPlayer ) == CS_TEAM_T )
       {
     new 
iPlayers32 ], iNum;
            
get_playersiPlayersiNum"ae""CT" );
             for( new 
0iNumi++ )
              {
                   
StripWeaponsiPlayers] );
              }
    }
       }
 

still error...
edgaras85 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-10-2010 , 10:02   Re: Undefined Symbol
Reply With Quote #2

In the first function, replace iPlayer with tid in is_user_alive and wherever else it may be used. I didn't evaluate what this function does but see if that solves your problem.
__________________
Bugsy is offline
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 05-10-2010 , 14:45   Re: Undefined Symbol
Reply With Quote #3

PHP Code:
public resultsOfVote(tid){
 
gbVote=false;
 
 new 
giVotesOn=count(VOTE_ON);
 new 
giVotesOff=count(VOTE_OFF);
 
 
ColorChat(0,GREEN"[FreeRun]^x01 %L %L(%d) vs %L(%d)",LANG_SERVER,"FREERUN_RESULTS",LANG_SERVER,"YES",giVotesOn,LANG_SERVER,"NO"giVotesOff);
 
 if( 
giVotesOn == giVotesOff ){
  
ColorChat(0,GREEN"[FreeRun]^x01 %L",LANG_SERVER,"FREERUN_TIE");
  return;
 }
 
makeFreeRun((giVotesOn giVotesOff));
 
ColorChat(0,GREEN"[FreeRun]^x01 %L ^x03%L",LANG_SERVER,"FREERUN_WINOPTION",LANG_SERVERgbFreeRun?"YES":"NO");
}
makeFreeRun(bool:bFR=true){
 
gbFreeRun=bFR;
 
reset();
 
giRounds=0;
 
giTime=get_systime();
 
 if(
gbFreeRun){
  
set_hudmessage(02552550.02, -1.0);
  
show_hudmessage(0"FreeRun!");
  if (
is_user_alivetid )  &&  cs_get_user_teamtid ) == CS_TEAM_T )
       {
     new 
iPlayers32 ], iNum;
            
get_playersiPlayersiNum"ae""CT" );
             for( new 
0iNumi++ )
              {
                   
StripWeaponsiPlayers] );
              }
      }
                 }
 

Now "tid" undefined symbol....
edgaras85 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-10-2010 , 16:50   Re: Undefined Symbol
Reply With Quote #4

Oops, I didnt notice there were two separate functions. Ill take a look when I get home.
__________________
Bugsy is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2010 , 18:18   Re: Undefined Symbol
Reply With Quote #5

I'm assuming that you would need the alive and team check inside the loop and then iPlayer = iPlayers[i] before the if().
__________________
fysiks is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-10-2010 , 19:20   Re: Undefined Symbol
Reply With Quote #6

Before I look at the code, please explain exactly what it does (be specific). It appears it is supposed to strip all CT player weapons if BFR/gbFreeRun is true?
__________________
Bugsy is offline
edgaras85
Senior Member
Join Date: Mar 2010
Location: Lithuania
Old 05-11-2010 , 07:38   Re: Undefined Symbol
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
Before I look at the code, please explain exactly what it does (be specific). It appears it is supposed to strip all CT player weapons if BFR/gbFreeRun is true?
Yes its strips ct's weapons When is Free Run on deathrun
edgaras85 is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 05-11-2010 , 09:00   Re: Undefined Symbol
Reply With Quote #8

Try that (untested)
PHP Code:
makeFreeRunbool:bFR=true )
{
    
gbFreeRun bFR;
    
reset();
    
giRounds 0;
    
giTime get_systime();

    if( 
bFR )
    {
        
set_hudmessage(02552550.02, -1.0);
        
show_hudmessage(0"FreeRun!");

        new 
iPlayers32 ], iNum;
        
get_playersiPlayersiNum"ae""CT" );
        
        for( new 
0iNumi++ )
        {
            
StripWeaponsiPlayers] );
        }
    }

__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 03:37.


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