AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   How to fix these errors (https://forums.alliedmods.net/showthread.php?t=311980)

2389736818 11-10-2018 20:28

How to fix these errors
 
1 Attachment(s)
Code:
PHP Code:

//----------------------------------------------------------------------------------------------------
// Purpose: 
//----------------------------------------------------------------------------------------------------
public Action RetrieveWaveSettings(int waveint clientint argsint event)
{
    
int attacker GetClientOfUserId(GetEventInt(event"attacker"));
    if(!
attacker || !g_damage[attacker]) // si no hay atacante no se sigue con el codigo
    
    
int clientzm GetClientOfUserId(GetEventInt(event"userid"));
    
int restante GetClientHealth(clientzm);
    
//decl String:input[512];
    
char input[512];
    
int size 512;
    
char[] input = new char[size];
    
    
Handle l_hWave INVALID_HANDLE;
    
l_hWave OpenFile(g_cPathsWaveSettings"r");
    if (
l_hWave == INVALID_HANDLErestante 0)
    {
        
int damage GetEventInt(event"dmg_health");
        
CreateDefaultWave();
        
delete l_hWave;
        return 
Plugin_Handled;
    }
    
PrintHintText("%t""WAVE"wavedamageclientzmrestante);
    
LoadWave(wave);
    
delete l_hWave;
    return 
Plugin_Handled;
    for(
int clientzm 1clientzm <= MaxClientsclientzm)
    {
        if(
IsClientInGame(clientzm))
        {
            
g_damage[clientzm] = true;
        }
    }
    
g_damage[clientzm] = true;


''840'' in here
PHP Code:

    RetrieveWaveSettings(g_iWave); 

PHP Code:

//----------------------------------------------------------------------------------------------------
// Purpose: 
//----------------------------------------------------------------------------------------------------
public void Event_roundStart(Handle event, const char[] namebool dontBroadcast)
{
    
int l_iHumanPlayers;
    
g_bRoundInProgress false;
    
g_bSwitchingIndex true;
    
CreateTimer(g_fSwitchingTimerTimer_switchingModelINVALID_HANDLE);
    
RetrieveWaveSettings(g_iWave);
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsValidClient(i) && !IsClientSourceTV(i))
        {
            if (
IsFakeClient(i))
            {
                
SelectWaveBasedZM(i0);
            }
            else if (
GetClientTeam(i) > CS_TEAM_SPECTATOR)
            {
                
g_iClientRespawnCount[i] = g_iClientRespawnCountNum;
                
SelectWavebasedHuman(i);
                
l_iHumanPlayers++;
            }
        }
    }
    if (
l_iHumanPlayers 1)
        
ServerCommand("bot_kick");



Fyren 11-10-2018 20:51

Re: How to fix these errors
 
public Action RetrieveWaveSettings(int wave, int client, int args, int event) has four parameters. RetrieveWaveSettings(g_iWave) is only passing one.


All times are GMT -4. The time now is 21:35.

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