Sign In Register

How can we help you today?

Start a new topic
Answered

RT | Match Found Message Problem - Print Data with ScriptBuilder

 Hi Gamesparkers,


my Problem is to print out an received MatchFoundMessage in an Textfield. Spent couple of Hours

to resolve the Problem, but got no luck. i receive always this Error in the Console.


image


with a double click on the Error it redirects me to the Gamesparks PlatformBase Script


image



I receive the MatchFoundMessage:


image


For the Code i followed the Gamesparks RT Tutorial here:

Gamesparks RT Matchmaking Tutorial


image


When i build the ScriptBuilder outside the "onMatchFound" Method it works like a charm.
Also my Match in the Gamesparks Portal is set to Real Time with 2 max. Players.
Hopefully someone can help me out.

greetz
Andi



Best Answer

Hey Andi,

Does your Text object have a reference in the editor?

I think all that is wrong here is that the Text object is null, so you should make sure it is setup in the editor (see below).


If it has been destroyed then perhaps you are changing scenes while the RT match is being setup?

It is hard to tell what the problem is without more details. If you want to avoid this error, just check if MatchDetailsText is null in the onMatchFound method.


Thanks,
Sean


image



Answer

Hey Andi,

Does your Text object have a reference in the editor?

I think all that is wrong here is that the Text object is null, so you should make sure it is setup in the editor (see below).


If it has been destroyed then perhaps you are changing scenes while the RT match is being setup?

It is hard to tell what the problem is without more details. If you want to avoid this error, just check if MatchDetailsText is null in the onMatchFound method.


Thanks,
Sean


image



1 person likes this
Hey Sean, your great.

the Problem was that i have several Scenes (Loadingscreen, LobbyManager, MainMenu etc) and idk why but, the reference was lost during an Sceneload.
Now ive build an DataHolder Instance that dont destroy on Load when i change the Scenes and also i have added the "Null" Check in the onMatchFound Method.

Thanks a lot
Andi

 

Login to post a comment