Jump to content

Formula node multiple If are not working =/


sirzrx

Recommended Posts

INPUTS = h and p

OUTPUT = a

ill use this syntax to move across a long constant array table.

this is a Formula Node like C++ Programing

----------

if(h=40) {

a=1;

}

if(h=50) {

a=9;

}

if(h=60) {

a=13;

}

if(h=75) {

a=17;

}

a=a-p;

-------

WHY THE OUTPUT IS ALWAYS THE LAST a VALUE? should i use switch-case if i have... can some post an example?.....Thx for ur help!

-------------------------------------

By Sir ZRX!

Link to comment
INPUTS = h and p

OUTPUT = a

ill use this syntax to move across a long constant array table.

this is a Formula Node like C++ Programing

----------

if(h=40) {

a=1;

}

if(h=50) {

a=9;

}

if(h=60) {

a=13;

}

if(h=75) {

a=17;

}

a=a-p;

-------

WHY THE OUTPUT IS ALWAYS THE LAST a VALUE?  should i use switch-case if i have... can some post an example?.....Thx for ur help!

-------------------------------------

By Sir ZRX!

2641[/snapback]

The correct syntax to test an equality is

if (h==75)

.

As written,

if (h=75)

assigns 75 to h and tests its value to TRUE, since it is different from 0.

post-584-1147876043.png?width=400

Link to comment
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.