Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome General
 PowerHome Messageboard : PowerHome General
Subject Topic: syntax error? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: January 15 2011 at 15:45 | IP Logged Quote jeffw_00

If I cut/paste these properly to this message, then all the nesting is correct. Still, PH claims either of these has syntax errors, can someone enlighten me?

thanks!
/j

They're both JUMP commands
--------------------------
if(ph_and([LOCAL8]=0,[LOCAL9]=0),2,if(ph_and([LOCAL8]>0,[LOCAL9]=0),1,if([LOCAL9]>0,4,6)))



if(ph_and(ph_getvar_n(1,8)=0,ph_getvar_n(1,9)=0),2,if(ph_and (ph_getvar_n(1,8)>0,ph_getvar_n(1,9)=0),1,if(ph_getvar_n( 1,9)>0,4,6)))
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 15 2011 at 17:42 | IP Logged Quote dhoward

Jeff,

I think your problem is in the use of the ph_and function. This
function is a bitwise function and must operate on numeric values.
By having a comparison as values, youre passing booleans which will
cause a syntax error. The proper logical operator for AND is just the
word and.

Hope this helps.

Dave
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
jeffw_00
Super User
Super User


Joined: June 30 2007
Online Status: Offline
Posts: 929
Posted: January 15 2011 at 18:03 | IP Logged Quote jeffw_00

thanks dave - wasn't sure AND would work - couldn't find it in the help.

best
/j
Back to Top View jeffw_00's Profile Search for other posts by jeffw_00
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum