Duplicate variable name- glitch?
Blitz3D Forums/Blitz3D Programming/Duplicate variable name- glitch?
| ||
sorry- want to check something first Last edited 2011 |
| ||
A duplicate variable name is normally exactly that. Remember that variable names are not case sensitive, so myVar, MyVar and MYVAR, are all the same. Other than that, post some code. |
| ||
Thanks-I found the problem, I was assigning a value before declaring that variable later as global- which is a mistake I'm familiar with- but the cursor was pointing me to the wrong variable which had me completely baffled?! |
| ||
If the debugger is pointing you to the wrong line (is that what happened above), it could be due to this bug: http://www.blitzbasic.com/Community/posts.php?topic=91532 I think (not 100% sure) that bug is with IDEal, not Blitz3D's editor, so if you weren't using IDEal it's probably not that. |
| ||
I've had Blitz3D occasionally point me to the wrong line both in IDEal and in the days of when I used the default editor. I think there are just certain once-in-a-blue-moon conditions that make the parser (or whatever is the applicable term here) get slightly messed up. Best way I've found to check on this: comment out the line it's pointing you to. If it still points you to that line or an adjacent line, with the same error, then the line that's ACTUALLY at fault is usually nearby but not actually being pointed to. Last edited 2011 |