Config Parser – Talk
Works/Doesn't
There are some cases that show somewhat confusing behavior, so until we can find the general rule behind it, perhaps we should start collecting what works/doesn't work back here:
WORKS | DOESN'T WORK | Comment |
---|---|---|
__EXEC(_txt = str 1000) | __EXEC(_txt = str 1000+1) | addition after str command |
displayName = $STR_SHORT_GENERAL | displayName = __EVAL(localize "STR_SHORT_GENERAL") | can't use commands in property assignments in an addon's config file? |
I don't think this article should use examples like this one:
__EXEC (_str = format["daytime: %1",dayTime])
The article should focus mainly on assigning and incrementing of number variables, as well as string manipulation / concatenation. These are the main uses for the config parser.
I think using the "daytime" example just confuses the issue, and will make people think about the config parser incorrectly. It is only run once, either when packing the pbo, or when loading the pbo / mission. Commands that refer to the game environment (like "daytime") make no sense in this situation. Same goes for the example using (_this select 0), since you can't really pass parameters in the parser.
Also, an example of using a do/while "loop" within an __EXEC statement would be nice, as this is a way to do conditional operations without using parenthesis. --General Barron 22:40, 4 November 2008 (CET)