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

CVAR 'mapcyclefile' always returns 'mapcycle.txt'


Post New Thread Reply   
 
Thread Tools Display Modes
Drak
Veteran Member
Join Date: Jul 2005
Old 01-14-2009 , 00:09   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #11

Quote:
Originally Posted by AdamR View Post
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?
Code:
new p_Cvar ... p_Cvar = register_cvar("amx_somecvar","1.0");
They sacrifice small bit of memory for speed. get_pcvar_*/set_pcvar_* are direct "pointers" to the CVar memory. Instead of a string look-up. (It's always recommended to use PCvar's over CVars)
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
Bad_Bud
Senior Member
Join Date: Oct 2006
Location: The internet
Old 01-16-2009 , 00:20   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #12

Figure it out yet, or should I install Sven and fry my brain for (computer) science?
__________________
Bad_Bud is offline
AdamR
Senior Member
Join Date: Dec 2006
Location: Cardiff, South Wales
Old 01-16-2009 , 06:49   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #13

I haven't seems to be an issue even with the official non-modified plug-in too.

(there is a rar archive of the game if you don't want an installer)
__________________
Thanks,

Adam Reece - Sven Co-op team.
AdamR is offline
Send a message via Skype™ to AdamR
AdamR
Senior Member
Join Date: Dec 2006
Location: Cardiff, South Wales
Old 11-07-2009 , 11:32   Re: CVAR 'mapcyclefile' always returns 'mapcycle.txt'
Reply With Quote #14

For the record, this was caused because Sven Co-op had the 'mapcyclefile' CVAR protected.

I have changed this to just FCVAR_SERVER and FCVAR_UNLOGGED and AMXX now reads it fine, every time. This fix will be available in version 4.1 of Sven Co-op.
__________________
Thanks,

Adam Reece - Sven Co-op team.
AdamR is offline
Send a message via Skype™ to AdamR
Reply



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 07:08.


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