Duplicate variable name- glitch?

Blitz3D Forums/Blitz3D Programming/Duplicate variable name- glitch?

Slomas(Posted 2011) [#1]
sorry- want to check something first

Last edited 2011


GfK(Posted 2011) [#2]
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.


Slomas(Posted 2011) [#3]
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?!


Yasha(Posted 2011) [#4]
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.


Adam Novagen(Posted 2011) [#5]
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