Variable already declared?
Greetings,
I have an odd case where I have a chain of else-if's, and a variable declared in one elif is in the same scope as another. Am I not fully understanding scope, or is it just not a good idea to program at 8am? Code:
|
Re: Variable already declared?
You have it defined somewhere else prior to the else-if block. Show the full function.
As a general 'lesson', whenever you're unsure whether there's a bug in the compiler or not, it's good to run a simple code through it: PHP Code:
|
Re: Variable already declared?
Here's the full function.
PHP Code:
*Edit Bad indenting on here. Picture might be easier to read. http://puu.sh/aK0Lr/868f3be04c.png |
Re: Variable already declared?
... Interesting.
PHP Code:
PHP Code:
|
Re: Variable already declared?
Uhh no, I have not. It's not a big deal to use different variable names though. Good to know I'm not crazy ;)
I assume you've reported the bug then, if not I can. |
Re: Variable already declared?
I'm a bit busy right now, so it'd be great if you reported the bug, but I can report it later myself.
|
Re: Variable already declared?
Taken care of. Thanks for the help.
|
| All times are GMT -4. The time now is 12:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.