Raised This Month: $12 Target: $400
 3% 

[Fixed] SH_MINLEVEL = 1, but v.1.17.6 keeps setting it to 0


  
 
 
Thread Tools Display Modes
Author Message
Alphabet Soup
Member
Join Date: Apr 2004
Old 12-16-2004 , 14:01   [Fixed] SH_MINLEVEL = 1, but v.1.17.6 keeps setting it to 0
#1

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!
Alphabet Soup is offline
jtp10181
Veteran Member
Join Date: May 2004
Location: Madison, WI
Old 12-16-2004 , 20:39  
#2

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
__________________
jtp10181 is offline
Send a message via ICQ to jtp10181 Send a message via AIM to jtp10181 Send a message via MSN to jtp10181 Send a message via Yahoo to jtp10181
Alphabet Soup
Member
Join Date: Apr 2004
Old 12-16-2004 , 22:07   Thanks
#3

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


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 06:52.


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