Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-10-2012, 11:12 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
New NPCServer Bug: return in switch statements

This started happening after Era was restarted earlier today.

PHP Code:
function onCreated() {
  
temp.key "abc";
  
  switch (
temp.key) {
    case 
"foo":
      echo(
"key=foo");
      return; 
// this line is problematic
    
break;
    
    case 
"abc":
      echo(
"key=abc");
    break;
  }

If you run the following code, nothing will echo. If you comment out the return statement, then it will echo "key=abc" as expected.

It appears that a return statement in a switch causes everything below it to be ignored, even if that case shouldn't have been executed. This is new functionality which is breaking a few things on Era. It did not happen before the server restart today.

This bug also appears to exist clientside on both v5 and v6.
__________________
Reply With Quote
 


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 +2. The time now is 12:10 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.