Jump to content

Vex - attribute reading warning


SteveNi

Recommended Posts

Hi

So I have some Vex code and I keep getting this warning:

It says "implicit cast from float to int, use explicit cast instead".

Now I know this warning message, but I dont understand why Im getting it here, since Im dealing with vectors...the code works and everything, but I keep getting that and I don't know how to get rid of it.

Any hints?

Thanks.

Screenshot_1.jpg

Link to comment
Share on other sites

You need to use type prefix on the first usage of @-binding inside wrangle: i@ptn will work. Without prefix, it will be defaulted to f@ptn or to the proper type, if the attribute name is something common (standard VEX/VOP variables and globals are recognized).

Edited by f1480187
  • Like 1
Link to comment
Share on other sites

I suppose you want to use @ptnum instead of @ptn for the number of the current point? Then the attribute is buitin and you do not need to prefix it.
And you can simplify the call a bit by replacing

attrib(1, "point", "up", @ptnum) 

by

v@opinput1_up

This only works if you are requesting an attribute for the same point number from any input.

Link to comment
Share on other sites

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.

Guest
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...