Skip to content

NTSL compile errors and save changes #6690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Scrambledeggs00
Copy link

About The Pull Request

This PR does three things:

  • It adds a log message whenever the NTSL traffic console save your code.
  • It breaks off the max character check from the invalid character check and into its own if statement, displaying how many characters the saved code has and the max character limit in the log.
  • It lowers the max character limit from 20,000 characters to 15,000 characters.

Why It's Good For The Game

For code saving, this is helpful for larger scripts, since the UI is slow to save them. If a script is compiled before it is saved, it either throws an error because it thinks you tried to compile nothing or it compiles whatever it had saved previously. With the console log now telling you when it is saved, you no longer have to wait for the button press sound to know that it saved your code.

For the error checks, before this PR, one method checked for both invalid characters and if the script was over the max character limit. This is bad because if you had a script that was too big, rather than tell you that, it would say that you had an invalid character. With the checks now separated, along with it showing your script's character count and the max character count, it is now easier to troubleshoot NTSL compile errors.

For lowering the max character count, TGUI does not seem capable of compiling scripts anywhere near 20,000 characters, with it starting to break down around ~16,000-15,000 characters. With the max character count lowered to 15,000, this will still allow for large scripts while also lessening the affects of TGUI having difficulty with them. Even around 15,000 characters, TGUI is slow to save NTSL code as it takes around 5-10 seconds for it to trigger the code that saves your NTSL script.

##Testing

https://www.youtube.com/watch?v=qFo-1nuYZwE

Changelog

🆑
qol: Broke NTSL invalid and max character checks into separate checks for easier troubleshooting
fix: Lowered NTSL max characters to 15,000 due to TGUI limitations
/:cl:

@Absolucy Absolucy added Code: Fix fix da bug QoL improves quality of life labels May 15, 2025
@Absolucy
Copy link
Member

tbh most nice thing for NTSL would be a way to debug runtime errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code: Fix fix da bug QoL improves quality of life
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants