Issue information

Issue ID
#3273
Status
Fixed
Severity
Medium
Started
Hercules Elf Bot
Jun 20, 2009 10:04
Last Post
Hercules Elf Bot
Jun 20, 2009 10:04
Confirmation
N/A

Hercules Elf Bot - Jun 20, 2009 10:04

Originally posted by [b]Dragonmaster[/b]
http://www.eathena.ws/board/index.php?autocom=bugtracker&showbug=3273

I noticed that an if statement in npc script does not view a switch statement as its contents. The switch will still be done, but if the if statement contents are not enclosed in {} then the if statement will affect the next line after the switch.
Ex:

CODE
if(condition)
    switch(int){
        case 1:
        case 2:
    }
mes "test";
warp map, x, y;


the 'mes "test";' line in this example will never be called if the condition is false, and will only be called if the condition is true. The warp line after it will always be called.