Mr B
Joined: 20 Mar 2003 Posts: 382
|
Posted: Thu Oct 21, 2004 6:18 pm Post subject: Local Variable Problems |
|
|
This isn't a post asking for help, per se. But I noticed some...odd compiler behaviour, and I wanted to know if anyone knows more about it than I do.
When I declare a local variable in a script, but do not use it, the compiler alerts me to the fact, but compiles anyway.
However, once every 3 million years (or thereabouts) the compiler flips out and gives error messages. From then on it will give me the error message, even if I delete the entire script and start over again with completely different names (even for the script).
Once I actually used the variable in the script, the compiler was fine again.
So it would seem that I just shouldn't declare local variables without using them.
However, I'm worried that this isn't the whole picture. The fact that the compiler did this worries me. Does anyone know if there are more side effects to this behaviour than I am aware of? Because I'm working on a Halloween game, I don't have much time to deal with compiler freakiness.
Thanks in advance. |
|