Tatsuman Posted May 22, 2020 Share Posted May 22, 2020 Hello Community, I am stuck on a problem to get colors from multi-list parameter. I am trying to implement picking a color from a multi-list parameter randomly and I wrote this vex below. int seed = int(rand(@ptnum) * chf("colors")); v@Cd = chv(sprintf("./color%dr",seed+1)); For some reason, it gives me black or white only... And I couldn't figure out why is this happening. Could someone advise me about this? Thank you in advance! Harutabi.hiplc Quote Link to comment Share on other sites More sharing options...
Tatsuman Posted May 22, 2020 Author Share Posted May 22, 2020 Figured out and it was very dumb... I had extra "r" after %d in sprintf function... Thank you all 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.