playMaker

Author Topic: Out of Range?? Error  (Read 2781 times)

halas

  • Playmaker Newbie
  • *
  • Posts: 8
Out of Range?? Error
« on: December 06, 2017, 11:27:48 PM »
Hey, Newb Here.

I am currently getting 491 of these errors all of a sudden.

Error Loading Action: Green : HutongGames.PlayMaker.Actions.SetMaterialColor : everyFrame
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: startIndex


And I have no idea where or what it has to do with. It doesn't seem to affect anything I have noticed so far, but it just seems off.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Out of Range?? Error
« Reply #1 on: December 06, 2017, 11:33:39 PM »
What version of Unity and Playmaker?

halas

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Out of Range?? Error
« Reply #2 on: December 06, 2017, 11:52:24 PM »
Unity 2017 .2
Playmaker 1.8.5 - I think

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Out of Range?? Error
« Reply #3 on: December 07, 2017, 01:24:15 PM »
Are you able to share the project? Please PM me if you can (don’t post publicly since that would let anyone download Playmaker). Thanks!

omgitstri

  • Playmaker Newbie
  • *
  • Posts: 46
    • My Prototypes
Re: Out of Range?? Error
« Reply #4 on: December 07, 2017, 01:38:05 PM »
Hello,

I had the same problem recently. I was updating the color by modifying the RGB value and it went into a negative value when I set the mesh color with the new value. A fix I used is to clamp the float value for RGB to 0-1 before setting it.

I hope this helps.
Tri Nguyen
Game Designer at Nvizzio Creations

halas

  • Playmaker Newbie
  • *
  • Posts: 8
Re: Out of Range?? Error
« Reply #5 on: December 07, 2017, 11:57:18 PM »
Hello,

I had the same problem recently. I was updating the color by modifying the RGB value and it went into a negative value when I set the mesh color with the new value. A fix I used is to clamp the float value for RGB to 0-1 before setting it.

I hope this helps.

Can you elaborate a little bit more? I do not understand too much. I have been playing around with lighting and shaders.

saneinsylum

  • Playmaker Newbie
  • *
  • Posts: 14
Re: Out of Range?? Error
« Reply #6 on: December 08, 2017, 03:16:04 AM »
int compare
compare X to 0 or 1
if less
send to event that sets X to 0 or 1
if equal or more
send to event that continues the FSM

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Out of Range?? Error
« Reply #7 on: December 08, 2017, 10:06:01 AM »
You can also use the Int Clamp action:
https://hutonggames.fogbugz.com/default.asp?W78
A little easier  ;)