This chapter describes the changes needed to make urbiscript code written for urbiscript 2 work in the urbiscript 3 interpreter.
The most visible change from urbiscript 2 to urbiscript 3 is that functions are no longer called when parenthesis are omitted. The function itself is returned instead.
So one must add missing parenthesis around all function calls, or convert functions with no arguments to properties (7.8) where appropriate.
To help you track function calls missing parenthesis, you can define the environment variable URBI_REPORT_MISSING_PAREN.
function f() {1};
[00004397] function () { 1 }
f; // In urbiscript 2 this would have called f
[ Urbi.Compatibility ] Maybe missing parens at 2.1
[00005092] function () { 1 }
This will produce false positives in the urbiscript standard library that you can safely ignore, and false positives in urbiscript 3 code.
Since Slots are now exposed in urbiscript, the urbiscript 2 Slot.getSlot and Slot.setSlot have been renamed to Slot.getSlotValue and Slot.setSlotValue.
Since packages (8) were introduced, some functions are no longuer directly accessible without the proper import or package prefix. One notable instance is the content of System: