AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   (OLD) Bug Reports (https://forums.alliedmods.net/forumdisplay.php?f=48)
-   -   [Fixed] SH_MINLEVEL = 1, but v.1.17.6 keeps setting it to 0 (https://forums.alliedmods.net/showthread.php?t=31996)

Alphabet Soup 12-16-2004 14:01

[Fixed] SH_MINLEVEL = 1, but v.1.17.6 keeps setting it to 0
 
New code seems to be reseting my sh_minlevel 1 CVAR to sh_minlevel 0.

Temporary Fix:

Comment out lines 512 to 514 to remove CVAR checking for sh_minlevel in the superheromod.sma

Code:

//        new minLevel = get_cvar_num("sh_minlevel")
//        if ( minLevel > gNumLevels ) set_cvar_num("sh_minlevel", gNumLevels)
//        if ( minLevel < 0 ) set_cvar_num("sh_minlevel", 0)

Don't forget to recomplie and load that version when you're done!

jtp10181 12-16-2004 20:39

move all the cvar checking to the bottom of that function like this...

Code:
    // Setup XPGiven and XP     readINI()     //Init CMD_PROJECTOR     build_sh_hudmessage()     //Reload Hero Levels from cvars     set_HeroLevels()     //Check variables for invalid settings     new XPSaveDays = get_cvar_num("sh_xpsavedays")     if ( XPSaveDays > 365 ) set_cvar_num("sh_xpsavedays", 365)     if ( XPSaveDays < 0 ) set_cvar_num("sh_xpsavedays", 0)     new minLevel = get_cvar_num("sh_minlevel")     if ( minLevel > gNumLevels ) set_cvar_num("sh_minlevel", gNumLevels)     if ( minLevel < 0 ) set_cvar_num("sh_minlevel", 0)     if (get_cvar_num("0") == 2) {         new mercyXP = get_cvar_num("sh_mercyxp")         if ( mercyXP > gNumLevels ) set_cvar_num("sh_mercyxp", gNumLevels)         if ( mercyXP < 0 ) set_cvar_num("sh_mercyxp", 0)     }     // Tasks     set_task(1.0, "loop1P0", 0, "", 0, "b")     set_task(3.0, "set_sv_maxspeed") }

I stupidly had it checking before it read the INI in.... and wow I just noticed the mercy XP check wont work at all cause its not checking the cvar.... its checking "0"

I'll prob post a 1.17.6a shortly to fix any minor bugs like this that come up.... cause after that I think I'm gonna work on 1.2

Alphabet Soup 12-16-2004 22:07

Thanks
 
Ok - updated code. Will report back if there's a problem again--but this should do the trick!


All times are GMT -4. The time now is 16:11.

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