syntax error in if statement

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
forbbs
Human
Human
Posts: 30
Joined: 26 Jul 2011, 21:03
Noob?: Yes

syntax error in if statement

#1 Post by forbbs »

macro plugin will report "syntax error in if statement" if somevar is undef or unset in codes like this

Code: Select all

if ($somevar == apple || $somevar == banana) {
 log  balabala
}

c4c1n6kr3m1
The Way Of Human
The Way Of Human
Posts: 150
Joined: 24 Mar 2012, 04:13
Noob?: Yes

Re: syntax error in if statement

#2 Post by c4c1n6kr3m1 »

how about this?

Code: Select all

if (($somevar == apple) || ($somevar == banana)) {
 log  balabala
}

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

Re: syntax error in if statement

#3 Post by Kaspy »

The version of the plugin is updated?
Image

forbbs
Human
Human
Posts: 30
Joined: 26 Jul 2011, 21:03
Noob?: Yes

Re: syntax error in if statement

#4 Post by forbbs »

I have updated r8901,same problem.

Post Reply