I have a syntax error in my script but the line looks fine
Forums
I was working on a script that I will hopefully post to the site in the next few days. Tonight I came back to it and it was giving me a syntax error on line 56. Looked at the line and it looked fine, tried it again and the same thing. So I commented out the line and still got the error on line 56. Changed some code and moved the line and the error was still on 56. Then I remembered, I had several dialogs and each of those dialogs has hidden code, so line 56 that it was showing me in the IDEAScript editor isn't actually line 56 it is some other line (yes the editor can be very dumb). I then opened the script in Netbeans, another IDE I use and looked at line 56 and realized that it was for a dialog that I was no longer using so that was the problem. Deleted the dialog and the script ran fine.
So the moral of the story is to never believe the editor when it gives you a syntax error, especially when you have dialogs.
Hi Andy,
Hi Andy,
I have found that this usually happens if you delete something in the dialog but you haven't deleted the related code. Also this happens when you have a drop-down but forget to attach a list, it doesn't give an error in the dialog because the dialog is hidden so it give random code errors.
Now if you have no dialogs then this sounds like something different. Any chance you can share one of those scripts so I can have a look at it.
I have also found times when the code just doesn't work, I usually have to delete it and write it over again, doesn't happen often but every once in a while, that is why it is important to test frequently to figure out where things might go wrong. In these instances there might be a hidden character that is causing the error so that only way is to delete that portion and start over.
Brian
Hi Brian,
Hi Brian,
Could you provide a little more information on this? I am having the same problem and it's incredibly frustrating. The error pops up regardless of whether I delete any Dialog boxes and even occurs when I try to run script that doesn't have a dialog box attached.
Do you know what, specifically, it is about dialog boxes that causes it? Is there some way to 'reset' the compiler to forget the error after it has occurred? (I tried deleting all dialog boxes in the script but the error still appears!)
Any help you can offer would be greatly appreciated!
Andy