As of Quest 5.4, the eval function requires a dictionary as a second parameter; previously this was optional. Consequently this will no longer work:
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="test_eval">
<gameid>d2528707-4046-43a3-a019-fdcbb3832ab9</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<start type="script">
val = Eval("2 + 2")
msg ("val is " + val)
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
Is this a bug? I do not even know what the required dictionary even does. The documentation should at least be updated, hopefully to explain how to use that dictionary.
One work around is to send an empty dictionary:
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="test_eval">
<gameid>d2528707-4046-43a3-a019-fdcbb3832ab9</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<start type="script">
val = Eval("2 + 2", game.empty)
msg ("val is " + val)
</start>
<empty type="stringdictionary" />
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
A second is to define your own functions that will add the empty dictionary. As far as I can see, you need one per return type, though Eval itself gets around that
<!--Saved by Quest 5.4.4873.16527-->
<asl version="540">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="test_eval">
<gameid>d2528707-4046-43a3-a019-fdcbb3832ab9</gameid>
<version>1.0</version>
<firstpublished>2013</firstpublished>
<empty type="stringdictionary" />
<start type="script">
val = IntEval("2 + 2")
msg ("val is " + val)
</start>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
<function name="StrEval" parameters="s" type="string">
return (Eval (s, game.empty))
</function>
<function name="IntEval" parameters="s" type="int">
return (Eval (s, game.empty))
</function>
</asl>
It is a strange function, Eval, as Quest seems to be happy if you call it "eval" or "EVAL"; most functions (and script commands) you need to get the capitalisation spot on.