Raised This Month: $ Target: $400
 0% 

Variable already declared?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 08-08-2014 , 11:57   Re: Variable already declared?
Reply With Quote #2

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:
public x()
{
    new 
yz
    
if(z) { new var; }
    else if(
y) { new var; }

Compiles fine.

Last edited by Backstabnoob; 08-08-2014 at 12:00.
Backstabnoob is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:58.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode