AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ID error (https://forums.alliedmods.net/showthread.php?t=127642)

edgaras85 05-23-2010 09:32

ID error
 
Error :
Quote:

\amxmodx\scripting\remaining.sma(83) : error 017:
undefined symbol "id"
PHP Code:

public ShowMessage( ) {
    new 
iPlayers32 ], iNumTEAMS ];
    
//get_players( iPlayers, iNum[ TE ], "ae", "TERRORIST" );
    
get_playersiPlayersiNumCT ], "ae""CT" );
 
    if( 
iNumTE ] > || iNumCT ] > ) {
        new 
iCvarsCVARS ];
 
        
iCvarsRED      ] = get_pcvar_numg_pCvarsRED      ] );
        
iCvarsGREEN    ] = get_pcvar_numg_pCvarsGREEN    ] );
        
iCvarsBLUE     ] = get_pcvar_numg_pCvarsBLUE     ] );
        
iCvarsLOCATION ] = get_pcvar_numg_pCvarsLOCATION ] );
 
        if( 
iCvarsLOCATION ] > sizeofg_flCoords ) - ) {
            
set_pcvar_numg_pCvarsLOCATION ], );
 
            
iCvarsLOCATION ] = 1;
        }
 
        
set_hudmessageiCvarsRED ], iCvarsGREEN ], iCvarsBLUE ], 
        
g_flCoordsiCvarsLOCATION ] ][ ], g_flCoordsiCvarsLOCATION ] ][ ], 0HUD_STAYHUD_STAY0.00.0);
 
        
//show_hudmessage( 0, "Players Remaining^nTE: %i^nCT: %i", iNum[ TE ], iNum[ CT ] );
 
new CsTeams:iTeam cs_get_user_team(id);
 if (
iTeam == CS_TEAM_T)
  {
        
show_hudmessage(0"Counter-Terrorists Remaining: %i"iNumCT ] );
  }
 }
    }



Xalus 05-23-2010 09:32

Re: ID error
 
public ShowMessage(id) {

?

edgaras85 05-23-2010 09:42

Re: ID error
 
I tried that now
Quote:

amxmodx\scripting\remaining.sma(54) : error 088:
number of arguments does not match definition

Xalus 05-23-2010 09:44

Re: ID error
 
were u seted showmessage() ?

Copy it.

edgaras85 05-23-2010 09:54

Re: ID error
 
PHP Code:

public FwdThinkiEntity ) {
    
ShowMessage( );
    
    
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + DELAY );



Xalus 05-23-2010 10:11

Re: ID error
 
ShowMessage( iEntity );

edgaras85 05-23-2010 10:26

Re: ID error
 
Still not showing...

wrecked_ 05-23-2010 14:29

Re: ID error
 
You're copy+pasting and do not know what you're doing. This isn't the right place. Please don't ask for help via PM's anymore.

GXLZPGX 05-23-2010 15:01

Re: ID error
 
Quote:

Originally Posted by edgaras85 (Post 1188797)
Error :

PHP Code:

public ShowMessage( ) {
    new 
iPlayers32 ], iNumTEAMS ];
    
//get_players( iPlayers, iNum[ TE ], "ae", "TERRORIST" );
    
get_playersiPlayersiNumCT ], "ae""CT" );
 
    if( 
iNumTE ] > || iNumCT ] > ) {
        new 
iCvarsCVARS ];
 
        
iCvarsRED      ] = get_pcvar_numg_pCvarsRED      ] );
        
iCvarsGREEN    ] = get_pcvar_numg_pCvarsGREEN    ] );
        
iCvarsBLUE     ] = get_pcvar_numg_pCvarsBLUE     ] );
        
iCvarsLOCATION ] = get_pcvar_numg_pCvarsLOCATION ] );
 
        if( 
iCvarsLOCATION ] > sizeofg_flCoords ) - ) {
            
set_pcvar_numg_pCvarsLOCATION ], );
 
            
iCvarsLOCATION ] = 1;
        }
 
        
set_hudmessageiCvarsRED ], iCvarsGREEN ], iCvarsBLUE ], 
        
g_flCoordsiCvarsLOCATION ] ][ ], g_flCoordsiCvarsLOCATION ] ][ ], 0HUD_STAYHUD_STAY0.00.0);
 
        
//show_hudmessage( 0, "Players Remaining^nTE: %i^nCT: %i", iNum[ TE ], iNum[ CT ] );
 
new CsTeams:iTeam cs_get_user_team(id);
 if (
iTeam == CS_TEAM_T)
  {
        
show_hudmessage(0"Counter-Terrorists Remaining: %i"iNumCT ] );
  }
 }
    }



What's the full code. I cannot help you if you don't provide more information.

edgaras85 05-23-2010 15:07

Re: ID error
 
PHP Code:

#include <amxmodx>
#include <cstrike>
#include <engine>
#define DELAY 0.5
#define HUD_STAY DELAY + 0.1
enum _:CVARS {
   
RED,
   
GREEN,
   
BLUE,
   
LOCATION
};
enum _:TEAMS {
   
TE,
   
CT
};
new 
g_pCvarsCVARS ];
new const 
Float:g_flCoords[ ][ ] = {
   { 
0.02, -1.0 },
   { 
0.100.40 },
   { 
0.280.00 },
   { 
0.570.00 },
   { 
0.570.45 },
   { 
0.570.78 },
   { 
0.270.78 },
   { 
0.010.78 },
   { 
0.310.36 }
}
public 
plugin_init( ) {
   
register_plugin"Players Remaining""1.0""xPaw" );
   
   
g_pCvarsRED      ] = register_cvar"amx_pr_red",        "255" );
   
g_pCvarsGREEN    ] = register_cvar"amx_pr_green",      "0" );
   
g_pCvarsBLUE     ] = register_cvar"amx_pr_blue",       "0" );
   
g_pCvarsLOCATION ] = register_cvar"amx_pr_location",   "5" );
   
   new 
iEntity create_entity"info_target" );
   
   if( 
is_valid_entiEntity ) ) {
      
entity_set_stringiEntityEV_SZ_classname"PlayersRemainThinker" );
      
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + DELAY );
      
      
register_think"PlayersRemainThinker""FwdThink" );
   } else
   
set_taskDELAY"ShowMessage"___"b" );
}
public 
FwdThinkiEntity ) {
   
ShowMessageiEntity );
   
   
entity_set_floatiEntityEV_FL_nextthinkget_gametime( ) + DELAY );
}
public 
ShowMessageid ) {
   new 
iPlayers32 ], iNumTEAMS ];
   
//get_players( iPlayers, iNum[ TE ], "ae", "TERRORIST" );
   
get_playersiPlayersiNumCT ], "ae""CT" );
   
   if( 
iNumTE ] > || iNumCT ] > ) {
      new 
iCvarsCVARS ];
      
      
iCvarsRED      ] = get_pcvar_numg_pCvarsRED      ] );
      
iCvarsGREEN    ] = get_pcvar_numg_pCvarsGREEN    ] );
      
iCvarsBLUE     ] = get_pcvar_numg_pCvarsBLUE     ] );
      
iCvarsLOCATION ] = get_pcvar_numg_pCvarsLOCATION ] );
      
      if( 
iCvarsLOCATION ] > sizeofg_flCoords ) - ) {
         
set_pcvar_numg_pCvarsLOCATION ], );
         
         
iCvarsLOCATION ] = 1;
      }
      
      
set_hudmessageiCvarsRED ], iCvarsGREEN ], iCvarsBLUE ], 
      
g_flCoordsiCvarsLOCATION ] ][ ], g_flCoordsiCvarsLOCATION ] ][ ], 0HUD_STAYHUD_STAY0.00.0);
      
      
//show_hudmessage( 0, "Players Remaining^nTE: %i^nCT: %i", iNum[ TE ], iNum[ CT ] );
      
if(is_user_connected(id)) {
         new 
CsTeams:iTeam cs_get_user_team(id);
         if (
iTeam == CS_TEAM_T)
         {
            
show_hudmessage(0"Counter-Terrorists Remaining: %i"iNumCT ] );
         }
      }
   }




All times are GMT -4. The time now is 05:26.

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