garf Posted January 8, 2018 Share Posted January 8, 2018 (edited) How do you run an 'if' statement on a string in vex? if(@id==0){ @Cd = set(1,1,1); } will work but if I were to run it over a string attribute it errors with 'invalid assignment from string to float' if(@shape=='box'){ @Cd = set(1,1,1); } I know that running @shape="box" blast works so I tried it with just a single '=' also, but this errors too. Edited January 8, 2018 by garf Quote Link to comment Share on other sites More sharing options...
Shinjipierre Posted January 8, 2018 Share Posted January 8, 2018 s@shape=='box' You have specify the type of your variables in vex 1 Quote Link to comment Share on other sites More sharing options...
garf Posted January 8, 2018 Author Share Posted January 8, 2018 Nice one. Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.