CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Hi,
I'm trying to retrieve the CVAR mapcyclefile (default value mapcycle.txt) but no matter what I set this to in my server configuration, only the default value is seen. If I do rcon mapcyclefile, I get the map cycle file I actually configured returned. It appears AMXX is not getting the correct value. Could I get some help on where the issue could be? |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Coad plz
and server.cfg |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
1 Attachment(s)
Code attached.
Server configuration: Code:
// Log forwarding |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Kind of off topic, and I'm still looking, but how old is this file? Are you working from AMXX 1.8.1? I notice these are all cvars, not pcvars.
Gosh, it's from the latest version? They should look into changing that. But from what little I understood by looking at the code... Part of the problem may be that your svenfix is appended on to the end of what's already there. It already performs readMapCycle before it gets to your if statement, where it reads it yet again, changing the g_pos twice. Also sets the lastmapcycle twice. I don't think the cvar is being read incorrectly, because when you turn of the fix it works as it should, and your fix doesn't read in the cvar again. I can't look at it anymore today, sorry. Maybe in two days I can try again. |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
This code seems to fully function if the mapcyclefile cvar is left as default, or mapcycle.txt already exists.
The original plug-in is here. Basically, what I modified has to read the map cycle to see what should have been running now, and if not, ensure we don't skip the map. |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
With amx_nextmap_svenfix set to 0, I had changed the mapcyclefile cvar to newmapcyclefile.txt, and then made another and changed it to oldmapcyclefile.txt, and both times it read the files and worked fine.
I was trying to print out every value that went into every variable into a logfile, but it wasn't printing them, which is what I'm going to mess with next time I look at it -- or what you should do if you don't want to wait for me to mess with it. Either way, I suggest trying to make the fix an either-or option, not an appendage to the already existing plugin. It should be if(svenfix){do svenfix type map checking}else{do it the other way}, instead of {do it}if(svenfix){fix it}. And you could probably mess around a little bit and combine the if statement and the console command mainly into one function, and if you really want to impress people: change all of those cvars to pcvars. |
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
What game did you try it on?
|
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Condition Zero
|
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
May be a game issue as in Sven Co-op 4, I tried with amx_nextmap_svenfix 0 and it still claimed mapcycle.txt couldn't be found, yet if I type "mapcyclefile" in HLSW's RCON section it returns the modified cvar.
|
Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
BTW I thought the way I written it would have been best.
What needs to happen is read the map cycle as normal to determine the next map, but read the previous map to check if it's running now. This is to ensure the map cycle is followed, because if the current map isn't the previous map, it re-schedules the previous map to run again. That's why I'm reading the map cycle twice. What's the difference between a CVAR and PCVAR btw? |
| All times are GMT -4. The time now is 01:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.