playMaker

Author Topic: Error loading action~~  (Read 2488 times)

roronoazaoxl

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Error loading action~~
« on: December 03, 2012, 05:07:40 AM »
I have an aciton which has an FsmFloat member variable.

I used to assign this variable in it's declaration like this:

Public FsmFloat volum = 1f;

It works until I upgrade my game to Unity4.

I got lots of error in debug console like this:

Error loading action: Playbgmusic : FSM : trigger : PlayBackGroundMusic : volume
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(FsmState, Int32)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState)
HutongGames.PlayMaker.FsmState:LoadActions()
HutongGames.PlayMaker.Fsm:InitData()
HutongGames.PlayMaker.Fsm:Init(MonoBehaviour)
PlayMakerFSM:Awake()

Then I move the assigment to Reset() Method like this:

    public FsmFloat volume;

    public override void Reset()
    {
        volume = 1f;
    }

But I still get this error after I build my game( this error never happen when I execute in editor

mode).

This problem make my game crash a lot. Is anyone have idea that happen here.

Thanks!

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 111
    • View Profile
Re: Error loading action~~
« Reply #1 on: December 05, 2012, 07:05:14 AM »
The variable type and it's declaration aren't compatible.

'volume' is an FsmFloat variable, whilst '1f' is a Float. Try to set the Fsm variable value in your Reset() as this:

Code: [Select]
public override void Reset(){
  volume.Value = 1f;
}
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer: http://www.youtube.com/watch?v=yxfkGy4N-lQ

Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

roronoazaoxl

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error loading action~~
« Reply #2 on: December 06, 2012, 12:52:08 AM »
Thanks, I will try~~

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 3298
  • Official Playmaker Support
    • View Profile
    • LinkedIn
Re: Error loading action~~
« Reply #3 on: December 06, 2012, 11:11:06 PM »
If you're seeing action loading errors in the build, but not the editor, it's usually because actions have changed since FSMs that used them were last saved. Those FSMs need to be re-saved.

This is because of a performance optimization in Playmaker that works like this:

When action data is loaded in the editor, it tries to maintain parameters in actions that have changed. E.g., fields that existed previously keep their values and new fields get default values. When you re-save this FSM the action data is then consistent with the current version of the action.

However, when action data is loaded in a standalone build, Playmaker does not perform these checks - it assumes the data has been saved with the most current version of the action.

So if you have old prefabs using old versions of the action, or rarely loaded scenes which were last saved with old versions of the action, then you might see these kinds of errors.

I'm thinking about a better way to handle this, but haven't thought of anything yet... I'll put a suggested fix in the error message at least... :/

Marc Saubion

  • Junior Playmaker
  • **
  • Posts: 54
    • View Profile
Re: Error loading action~~
« Reply #4 on: February 06, 2018, 04:41:33 AM »
Hi.

Anything new about this?

I have the same issue but don't know how to save said FSMs and don't even know which one is causing the problem as the error message doesn't give enough intel.

Thanks

Quote
Error Loading Action: State 3 : HutongGames.PlayMaker.Actions.SendMessage : functionCall
System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[HutongGames.PlayMaker.FunctionCall].get_Item (Int32 index) [0x0000c] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633
  at HutongGames.PlayMaker.ActionData.GetFunctionCall (HutongGames.PlayMaker.Fsm fsm, Int32 paramIndex) [0x00000] in C:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1752
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, Int32 paramIndex) [0x001ed] in C:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1052
  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.Context context, Int32 actionIndex) [0x0024f] in C:\Users\Alex\Documents\Unity\Playmaker\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:939

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13002
  • Official Playmaker Support
    • View Profile
Re: Error loading action~~
« Reply #5 on: February 07, 2018, 02:31:17 AM »
Hi,

 can you describe or even better copy paste the method you are trying to call using sendMessage and also how you have setup your action?

 Bye,

 Jean

thecosmicboy

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error loading action~~
« Reply #6 on: February 26, 2018, 06:40:58 PM »
https://pasteboard.co/H9vyb2q.png



Having the same problems myself, finding it hard to find the fsm's they are contained in from the errors in the console.
« Last Edit: February 26, 2018, 06:43:06 PM by thecosmicboy »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13002
  • Official Playmaker Support
    • View Profile
Re: Error loading action~~
« Reply #7 on: February 26, 2018, 11:39:36 PM »
Hi,

 this is typically a case where you are going through childrens of a gameobject that are getting deleted as you loop through them.

 so when you use the action ActivateGameObject, during the process ( even if instantaneous), something else in your logic is deleting the objects in the list that this action has to work with.

Can you confirm this?

 Bye,

 Jean

 

thecosmicboy

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error loading action~~
« Reply #8 on: February 27, 2018, 09:04:10 AM »
You're most likely right,

However i'm struggling the past few hours to find the culprit, as the states named are "state 1" and "state 2" i'm guessing its some test fsm i've imported into the project from an old package or something as I try to name all of my states on fsms that are finalised.

I've been going through all of my scenes (big project) one by one and trudging through the fsms inside the playmaker editor, doesnt help that prefabbed fsms aren't grouped together into one in the list, some scenes I have hundreds of duplicate fsms I am searching though trying to find this fsm.

Any tips on searching or finding fsms containing states with a specific name? or any other method of tracking this fsm down?

 

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13002
  • Official Playmaker Support
    • View Profile
Re: Error loading action~~
« Reply #9 on: February 28, 2018, 12:37:00 AM »
Hi,

Yeah, this is missing currently in the PlayMaker toolbox. I have a work in progress on this which scan the whole project and turns it into am Xml description with everything, whicha llows you to do any kind of searches including finding state named xxx.

But currently, it's not available. I can give you access to the current state if you want.

 Bye,

 Jean

thecosmicboy

  • Playmaker Newbie
  • *
  • Posts: 4
    • View Profile
Re: Error loading action~~
« Reply #10 on: February 28, 2018, 09:03:43 AM »
I was using the find action feature in the editor, specifically on actions showing errors in the console to narrow down fsm's but didn't have as much luch with it as I thought, it seemed to omit the fsm's causing the problem.

I eventually found the culprit through trial and error, some old gameobjects with old fsm's I had imported into the scene. These objects were disabled and never ran in playmode, i'm guessing that's why it would not display the fsm names in the console like the others.

Yes that tool will definitely be useful in future, thanks