playMaker

Author Topic: How do I get playfab to go past a null result call? [Solved]  (Read 1280 times)

darkgriffin

  • Playmaker Newbie
  • *
  • Posts: 3
How do I get playfab to go past a null result call? [Solved]
« on: October 09, 2019, 08:51:42 PM »
Hi.  New user here.

I have a global manager for my game data as a Static script, with public static void function calls.

When I run playfab with this set in the Call Static Method, I get an error about type "null" not supported.  I've taken a screen shot of the setup and attached it.

My static call is this:

Code: [Select]
public static void NewGameData()
    {
        //wipe the existing game data object and create a new one.
        GameData = new GameData();
    }

Which as you can see just is creating a new GameData object.  (this object is some custom data for my editor, all the code checks out.  It just sets up some variables when setup.

The above just chokes PlayMaker with the message:

Unsupported Type: null

What am I doing wrong?  I checked the Type drop down but nothing seems relevant for catching a "null" result.

I really don't want to pass a variable back every time, since there's no point to creating more variables to store nulls in, and a lot of my calls will just be like "Write everything to a file" or "set this object value to x" type of commands.  So how can I get PlayMaker to accept a "null" and just move on after calling the function?
« Last Edit: October 14, 2019, 05:57:04 PM by darkgriffin »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I get playfab to go past a null result call?
« Reply #1 on: October 10, 2019, 02:41:52 AM »
Hi,

 your static method returns null, but your action expects an enum as result. you need to have nothing as result.

Bye,

 Jean

darkgriffin

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I get playfab to go past a null result call?
« Reply #2 on: October 11, 2019, 08:01:40 PM »
The drop down does not allow me to select "Nothing" as an option.  There is also no entry for "Null".  "Object" just doesn't match the type expected as usual.

Can you explain better what you mean by "you need to have nothing as a result"?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I get playfab to go past a null result call?
« Reply #3 on: October 14, 2019, 02:31:33 AM »
Hi,

ok, I see, can you paste the full error log you get?

try to comment the content of your static method, to rule out anything on PlayMaker side about calling it ( make a debug in the unity console for example to be sure it's called)

 Bye,

 Jean

darkgriffin

  • Playmaker Newbie
  • *
  • Posts: 3
Re: How do I get playfab to go past a null result call?
« Reply #4 on: October 14, 2019, 05:56:32 PM »
Wouldn't you know, now that I restarted Unity to try recreating the bug, today it seems to be working just fine.  I do have to select Enum or some kind of type from the drop down to avoid an error, but so long as I set the actual "store result" value to "none", it seems to work.

Maybe the compiler got confused somewhere along the way?  Very strange.  I do have my unity projects in a virtual drive created through Google's "Drive File Stream" service.  So maybe that software is choking the compilers and Play Maker just happened to be the "new tool" I was using at the time.

Eh, just go ahead and consider this solved for now.  If I ever figure out how to recreate what happened I will let you know.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How do I get playfab to go past a null result call? [Solved]
« Reply #5 on: October 15, 2019, 01:16:32 AM »
Hi,

 uhm, yeah, drives like google, dropbox and others are not good places to store unity projects, but I don't think it was the origin of the issue.

 It's best to use Github or bitbucket or similar.

Bye,

 Jean