Hi!
I needed an xor gate for my game but the visual scripting did not have it, so I had to add a JavaScript code block and write it there. However after I was done the preview did not work, it loaded to 100% and stayed there. The javascript code doesn’t show any errors. How could I fix that?
However there is a part that seems wrong, the syntaxer expects a semicolon on the if senteces condition wich should not be happening, if I add that the program does not run. If I dont it runs but none of the code I wrote while visual scripting works.
Thanks
The semicolon problem was me thinking javascript is like python and using the OR keyword.
I don’t get any errors when I change that in the code.
However even with no errors the program did not load.
Here is the code
Well this is clearly not the GDevelop api. Read the documentation and base your work on that instead of writing random words related to what you want to do and expecting it to work. Note also that JavaScript events are meant for users that know JS and what they are doing.