Just completed another update, this time focussing on function validation. The validator will now check that a function call has an appropriate number of parameters (it will not check the contents of the parameters yet though), and will make sure that whether or not it has a return value is appropriate for its usage. For example, if http://geck.gamesas.com/index.php/Enable (which has no return value) is used in a condition, the validator will give a warning. Similarly, if http://geck.gamesas.com/index.php/PlaceAtMe (which has a return value) is used on its own, rather than in a condition, the validator will give a warning (only a warning though, as this use is still valid).
I guess the next step would be to check the contents of function calls more rigorously, but at the moment most of the functions haven't had their parameters defined so they can't have them validated, so I'll probably end up working on the function dictionary for a while rather than new functionality.
I've also implemented a feature by which the required version of
FOSE for a script will be reported, but once again the usefulness of this feature is limited by the fact that most
FOSE functions haven't got their required versions defined yet in my dictionary.
If anyone wants to try out the new functionality, http://geck.gamesas.com/index.php/PlaceAtMe, http://geck.gamesas.com/index.php/Enable and http://fose.silverlock.org/fose_command_doc.html#GetFOSEVersion are all in the dictionary.
@
Tarrant:
Thanks for the bug report in your
PM. The validator should accept http://geck.gamesas.com/index.php/GameMode and http://geck.gamesas.com/index.php/MenuMode in effect scripts now (I assume that's what the problem was).
Cipscis
EDIT:
I just realised that I don't have a way to deal with those
FOSE functions that can be treated as reference functions
or non-reference functions... I guess that won't be a problem until I've fully defined some of them though. If anyone would be willing to help me out with function definitions, please let me know either here or via
PM.
Cipscis