/if else problem ? or intended to work this way?

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

Zerot
decaying skeleton
decaying skeleton
Posts: 6
Joined: Fri Dec 28, 2007 5:04 am

/if else problem ? or intended to work this way?

Post by Zerot » Sun Jan 20, 2008 6:38 am

is this working as intended?

Code: Select all

#turbo 5
Sub Main

:loop
	
	/if ( 0 ) {
		/echo Should NEVER get here!
	} else  /call healgroup
	

/goto :loop

/return

sub healgroup

/echo healgroup called

/return
I know how to fix this. But does else really require { } even for a 1 line command?

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Sun Jan 20, 2008 8:40 am

Code: Select all

   /if ( 0 ) {
      /echo Should NEVER get here!
   } else {
	 /call healgroup
   }
or

Code: Select all

   /if ( 0 ) {
      /echo Should NEVER get here!
   } else /if (1) /call healgroup
your pick
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 5:38 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:15 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:16 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:18 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:19 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:56 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 6:57 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 8:10 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: /if else problem ? or intended to work this way?

Post by xyilla » Sat Aug 23, 2025 8:11 pm