Playmaker Forum

Playmaker Help & Tips => Playmaker Help => Topic started by: Gua on December 22, 2018, 11:47:28 AM

Title: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 11:47:28 AM
I've recently upgraded my project to Unity 2018.3 and latest version of Playmaker.

In most FSMs when I right click on global transition I get this error.

Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Alex Chouls on December 22, 2018, 12:07:43 PM
Can you click the FSM tab and check the Data Version at the bottom of the inspector? It should say 2 unless it's a very old project.

What version of Playmaker and Unity did you update from?

If it says Data Version 1, try running PlayMaker > Tools > Update All Loaded FSMs
BACKUP your project first!

Or making any change to the FSM, e.g. moving a state should resave the FSM with the new Data Version.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 12:31:28 PM
On FSM featured in the video it says Data version 1. But I get this error on FSMs with Data version 2 as well.

I moved from 5.6.5 and Playmaker 1.8.4.f5

When I click Update All Loaded FSMs I get this
https://i.gyazo.com/ed118f0f5d9bcfe2adf6cbce46feb08f.png

Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 12:37:16 PM
Not sure why, but when I tried update all loaded FSMs for the second time. I got a lot more errors

https://i.gyazo.com/b8edb4816a658bbbfb928ef29f7c4f00.png
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Alex Chouls on December 22, 2018, 12:38:19 PM
Does making a manual change to the FSM update it to version 2?

1.8.4 is pretty old and 1.8.5 was a big update, so it might help to update the project to 1.8.5 first then 1.9.0. PM me if you need access to 1.8.5.

Also are you able to share the project so I can look at it? PM me a download link if you can share.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Alex Chouls on December 22, 2018, 12:43:48 PM
Also, to double check, are you only seeing this in that project or in new projects also?
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 01:00:34 PM
Does making a manual change to the FSM update it to version 2?
No.


Also are you able to share the project so I can look at it?
No. It's giant. Hundreds of gigabytes. But I can try to make seperate project with part from this project, where this issue will still occur.

Also, to double check, are you only seeing this in that project or in new projects also?
I did encountered some kind of issue in new empty project. It also appears when I try to create new global variable.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 01:09:34 PM
When I tried it the second time with new empty project. Everything worked fine. Maybe this issue was caused by Unity 5.6.5 that was opened in background.
I did encountered some kind of issue in new empty project. It also appears when I try to create new global variable.
When I tried it the second time with new empty project. Everything worked fine. Maybe this issue was caused by Unity 5.6.5 that was opened in background. Issue with my big project however remain.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 01:44:25 PM
I also get  Non-negative number required. error when I hit. Refresh used count in this scene. Even in empty scene.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 02:43:27 PM

1.8.4 is pretty old and 1.8.5 was a big update, so it might help to update the project to 1.8.5 first then 1.9.0. PM me if you need access to 1.8.5.

Will I'll be able to install it in in Unity 2018.3? Will I'll be able to unsull in in project where 1.9.0 was already installed?
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 03:05:07 PM
I'm currently doing some experiments, trying to find source of the issue. One strange tring that I've encountered is that. While I can use easy save 2 actions, I'm not able to locate scripts where those actions are stored

https://i.gyazo.com/fbcab2ee6b51c8cb0372fda110b863b4.png
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 22, 2018, 04:05:07 PM
Okay. I've made a huge progress. I've completely deleted Playmaker folder and installed Playmaker from the scratch into proper directory (Previously it wasn't in Playmakers default directory) some new errors appeared related to specific actions. When I've solved those errors, I did the test and Non-negative number required number did not pop-up. I'm not yet sure if logic somewhere is now broken. I'll post when I will have more info to share.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 23, 2018, 05:51:14 AM
Unfortunately in the process of this fix, most Run FSM actions lost connections to template.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 23, 2018, 06:48:25 AM
Unfortunately error has returned. Right now my project is at a stage where this error doesn't happen. But as soon as I open Canvas_RFPS prefab, edit fsm in there a save it. This error returns.


Happens also when I edit other prefabs.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 23, 2018, 03:57:00 PM
Also are you able to share the project so I can look at it? PM me a download link if you can share.
I've sent you PM with the link.
Title: Re: ArgumentOutOfRangeException: Non-negative number required. Parameter name: count
Post by: Gua on December 30, 2018, 12:32:38 AM
I was able to solve the issue! At some point I was able to downgrade Playmaker to 1.8.4 in 2018.3. And after fixing bunch of issues related to that downgrade, I've decided to try and install Playmaker 1.9p5 above downgraded 1.8.4 and now I'm not experiencing any issues.

I'm not sure what solved it, but I suspect that it issue might be caused by the fact that PlayMakersGlobals.asset wasn't located in default directory.