You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been messing around trying to get Integrated Scripting to work, and ended up putting together a developer environment to peek into the source code under the hood to understand why it was crashing/where I was going wrong. I did not read the book carefully enough and noticed that you had to physically highlight the member names you want to bind to the cards, and instead was just clicking on the left, meaning the card was only storing "function" or "var", etc. Inadvertently found a bug by doing this, whenever you are validating the errors to display on the card inside of the block you imported it in, this will throw an error and hard crash due to a value being null and trying to access it further. I believe this only occurs on the 1.0.2, it seems like it was a PR to fix another bug that was happening.
It may be worth investigating whether or not you can add the list of reserved keywords for javascript to invalid member names. I think I saw it's being done by RegEx only right now, unsure of how hard it would be to adapt further.
Short description:
Hard crash when not selecting a valid member name in the terminal, and then trying to use the card
Steps to reproduce the problem:
Create a simple function inside of a card and instead of selecting the member test, just click on the left so that it selects function instead of test function test() { return true }
Insert card into an operator slot
Hard crash when trying to display the error that "function" is not a member inside of script.js
Expected behaviour:
The server should not crash and should be able to display the error properly
Versions:
This mod: 1.20.1-1.0.2
Minecraft: 1.20.1
Forge: 47.0.1
Log file:
The text was updated successfully, but these errors were encountered:
Issue type:
I've been messing around trying to get Integrated Scripting to work, and ended up putting together a developer environment to peek into the source code under the hood to understand why it was crashing/where I was going wrong. I did not read the book carefully enough and noticed that you had to physically highlight the member names you want to bind to the cards, and instead was just clicking on the left, meaning the card was only storing "function" or "var", etc. Inadvertently found a bug by doing this, whenever you are validating the errors to display on the card inside of the block you imported it in, this will throw an error and hard crash due to a value being null and trying to access it further. I believe this only occurs on the 1.0.2, it seems like it was a PR to fix another bug that was happening.
This is the affected code that causes the crash
It may be worth investigating whether or not you can add the list of reserved keywords for javascript to invalid member names. I think I saw it's being done by RegEx only right now, unsure of how hard it would be to adapt further.
Short description:
Hard crash when not selecting a valid member name in the terminal, and then trying to use the card
Steps to reproduce the problem:
function test() { return true }
Expected behaviour:
The server should not crash and should be able to display the error properly
Versions:
Log file:
The text was updated successfully, but these errors were encountered: