Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

art3mis

vexpression: invalid array literal for type float

Can anyone tell me why the following throws an error on the numbers 5.41 and 0?

Quote

"Invalid array literal for type float"

if (@Frame > 24) {
    forcescale = {5.41};
} else {
    forcescale = {0};
}

 

Share this post


Link to post
Share on other sites

Is this in a Wrangle? Has forcescale been declared anywhere? 

Share this post


Link to post
Share on other sites

Vexpression in PopAttract.

AFAIK, forcescale has been tacitly declared, it's a default parameter for this POP.

 

Share this post


Link to post
Share on other sites

Thanks Marty.

Without I get another error (see attached), highliting the letter t in a string variable?? and the curly after 'else'

But then, last resort, I simply cut and paste the block of code and the error goes away!  A bug or a feature?:)IMG_20170530_195432.jpg

 

Edited by art3mis

Share this post


Link to post
Share on other sites

do you have a sample file; this is error free here:

float forcescale;

if (@Frame > 24) {
    forcescale = 5.41;
} else {
    forcescale = 0;
}

Edited by marty

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now