Author Topic: How to find Syntax errors?  (Read 2733 times)

How can i figure out where the position syntax errors with #?

Is it

Code: [Select]
##error##
or

Code: [Select]
error
##?##

or is it

Code: [Select]
##?##
Note: Im not coding anything i just want to know where the # is placed on

You don't. Badspots syntax error finder works 5% of the time.

Use TorqueDev. It's best free IDE for Torque that I could find.

You don't. Badspots syntax error finder works 5% of the time.

Use TorqueDev. It's best free IDE for Torque that I could find.
yeah if a human couldn't figure out the problem, surely this program will do much better
also, that's the stock syntax checker that runs when the script is compiled. if you know just a simple thingy about how those parse syntax and run code you would be better off
it works 100% of the time, if you're too dumb to figure out a painfully simple algorithm (loop through all characters one at a time) then you should practice more

ps: last I checked you aren't supposed to distribute .exe's on the forums, particularly not you
on the other hand the file appears clean (but that doesn't mean jack stuff if you're even just a little bit good at hacking) and the legit website is down

all of the above

if you forget up a package like this guy: http://forum.blockland.us/index.php?topic=241268.0
you'll note he only got one ## and it was way the hell at the end of the package
he could've had dozens of if statements in between and torque wouldn't've been any the wiser

i can't think of a time when I've seen ##error## but i'm positive it's out there


typically the error is directly after the problem: if you forget a ; it'll tell you on the next line

basically, it runs through parsing all of the data. if it runs into something it didn't expect (like a new thingy without a ; on the line before) then it'll stop and crap out an error at the new thingy not where the error actually was
« Last Edit: September 09, 2013, 05:04:35 PM by Lugnut »

lol @ lugnut posting about torquescript syntax

lol @ lugnut posting about torquescript syntax
just because i havent coded for a year doesn't mean i never had to deal with syntax errors when i was coding

Once you're more experienced, you'll find the error report is sufficient enough to find the error right away, if you even make the error in the first place.
While you're learning, you can post any errors you can't figure out in coding help.
Some errors can be entirely avoiding by good habits and/or proper formatting. For example, the bracket error that Lugnut posted would have been highly visible with better formatting, and if you do what I do, add the closing bracket and indent in the middle immediately after whenever you type an opening bracket, the error would have never happened.

or use a lovey clean editor like sublime text that does it for you

but yeah, still good practice to fit everything inside of premade brackets

ps: last I checked you aren't supposed to distribute .exe's on the forums, particularly not you
Well when you can't get it anymore... The website that hosted it is shut down for some reason a while back.