AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Server crashing from GameRules_GetPropFloat? (https://forums.alliedmods.net/showthread.php?t=321852)

foon 03-02-2020 21:37

Server crashing from GameRules_GetPropFloat?
 
This is for TF2, I have a plugin that i'm making to check the respawnwavetime for each team on round start and on player death (and change it if some conditions are met). Every now and then (usually once a day) I get a server crash from it, it looks like its always on round start.

I have an accelerator log if helps: https://crash.limetech.org/f5nlq5veivgn

Example of what im trying to do.
Code:

#define OWAVE 6.0

public void Event_Round_Start(Event event, const char[] name, bool dontBroadcast)
{
    if (changeplayerspawntime) {
        float RedTime = Get_Time(2);
        float BlueTime = Get_Time(3);
   
        Set_Time(2, OWAVE + RedTime);
        Set_Time(3, OWAVE + BlueTime);
    }
}

public void Set_Time(int team, float wave)
{
    GameRules_SetPropFloat("m_TeamRespawnWaveTimes", wave, team, true);
}

stock float Get_Time(int team)
{
    return GameRules_GetPropFloat("m_TeamRespawnWaveTimes", team);
}


nosoop 03-02-2020 23:59

Re: Server crashing from GameRules_GetPropFloat?
 
This may be related to alliedmodders/sourcemod#1089.

The fix is merged into 1.11; you may need to update to the developer branch, hope / wait for it to be backported into stable, or cherry-pick the commit and build SourceMod yourself.


All times are GMT -4. The time now is 17:44.

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