hey there,
i would like to suggest making it possible to change the script settings BY the script itself!
why?
because it can easily happen that players accidentally or intentionally change the script settings to incompatible values making the whole server running buggy and destroying the user experience :/
if the script is able to change a setting it could check the value for validity and change it back if it's invalid, but right now it's impossible as script settings are declared as constant
regards
steff
[Suggestion]Making script settings non-constant
Moderator: English Moderator
Re: [Suggestion]Making script settings non-constant
The script should not directly use the value if the value can be wrong. It isn't more difficult to do that than to change the settings value automatically.
Re: [Suggestion]Making script settings non-constant
of course that could be done, but isn't it kind of ugly if the script runs with a completely different value than defined in the script settings?Akbalder wrote:The script should not directly use the value if the value can be wrong. It isn't more difficult to do that than to change the settings value automatically.
Re: [Suggestion]Making script settings non-constant
I think that it is worst to see your settings automatically modified.
For example, a player would have to know in which order to change the settings to never be in a situation where the settings may be modified automatically.
I prefer that the script do the best choice in function of the asked settings.
For example, a player would have to know in which order to change the settings to never be in a situation where the settings may be modified automatically.
I prefer that the script do the best choice in function of the asked settings.
Re: [Suggestion]Making script settings non-constant
i don't see the need of knowing any "order", each setting can be checked on its ownAkbalder wrote:For example, a player would have to know in which order to change the settings to never be in a situation where the settings may be modified automatically.
for example a time limit: if you call vote the time limit to be "-5", the round will end as soon as it has started... and this value doesn't depend on any other settings
who/what else should check the settings than the script itself?Akbalder wrote:I prefer that the script do the best choice in function of the asked settings.
i wouldn't like to see a script running with completely different values than defined by the script settings, in fact the settings can be changed that much that you can't even tell how they are supposed to look like...
Re: [Suggestion]Making script settings non-constant
Suggestion :
Copy value of settings in another variable before each start of map.
Example :
#Settings S_TimeLimit 180 as ("Time Limit")
at main() start :
declare CurrentTimeLimit = S_TimeLimit;
and before each start of map, simply copy settings value to declared variable :
CurrentTimeLimit = S_TimeLimit;
then you can check if value of CurrentTimeLimt is okay
for exemple :
if (CurrentTimeLimit < 0) CurrentTimeLimit = 180;
And use this proper variable along your script.
if player change script settings, then it only change at map start and allways checked before map starts.
Copy value of settings in another variable before each start of map.
Example :
#Settings S_TimeLimit 180 as ("Time Limit")
at main() start :
declare CurrentTimeLimit = S_TimeLimit;
and before each start of map, simply copy settings value to declared variable :
CurrentTimeLimit = S_TimeLimit;
then you can check if value of CurrentTimeLimt is okay
for exemple :
if (CurrentTimeLimit < 0) CurrentTimeLimit = 180;
And use this proper variable along your script.
if player change script settings, then it only change at map start and allways checked before map starts.
Last edited by spaii on 30 Mar 2013, 00:33, edited 1 time in total.
Re: [Suggestion]Making script settings non-constant
i know how i could avoid invalid values!
but as already stated: i don't want that the script runs with completely different values than the users have declared in the script settings!!
but as already stated: i don't want that the script runs with completely different values than the users have declared in the script settings!!
Re: [Suggestion]Making script settings non-constant
so sorry, i think i don't understand 
I'm going to sleep, then come back tomorrow... zzZzzzzzzZZzzz

I'm going to sleep, then come back tomorrow... zzZzzzzzzZZzzz
Re: [Suggestion]Making script settings non-constant
In more complicated cases, some settings may be incompatibles with each others. When this happen, automatically chanching the settings values may not be possible.steeffeen wrote:i don't see the need of knowing any "order", each setting can be checked on its ownAkbalder wrote:For example, a player would have to know in which order to change the settings to never be in a situation where the settings may be modified automatically.
for example a time limit: if you call vote the time limit to be "-5", the round will end as soon as it has started... and this value doesn't depend on any settings
Re: [Suggestion]Making script settings non-constant
of course, then you don't have to do thatAkbalder wrote:In more complicated cases, some settings may be incompatibles with each others. When this happen, automatically chanching the settings values may not be possible.
Who is online
Users browsing this forum: No registered users and 1 guest