Editor
1. Script Call A Function With Parameters¶
Description: When a function that takes arguments is defined in an XS file is called using script call, all XS execution stops. No syntax errors are shown, this happens completely silently
Expected Behaviour: Function call works as expected, without crashing the entirety of XS execution
Reproduction Steps:
- Create a new scenario or RMS
- Create a new XS script with the following code:
1 2 3 4
void test(int a = 0, int b = 0) { xsChatData("this is var a: %d", a); xsChatData("this is var b: %d", b); }
- Include the script in the scenario, and create a trigger with a script call condition/effect
- Type
test(1, 2)
; in the message box for the script call - When the scenario is played, no text is chatted to the screen, execution fails silently
2. Script Call A Function With Comments¶
Description: When a function that contains comments is defined in a script call box, a parsing error is encountered
Expected Behaviour: Function call with comments should correctly ignore comments and parse
Reproduction Steps:
- Create a new scenario
- Create a new trigger with a script call effect
- Place the following code inside the script call box:
1 2 3 4
void main() { // hello, world xsChatData("hello, world"); }
- When the effect is double clicked/the scenario is played, a parse error is shown