The Photon Forum
is Closed Permanently.

After many dedicated years of service, we have made the decision to retire our Forum and switch to read-only: we´ve saved the best to last! Your search result can be found below. Plus, we offer support via these channels:

Try Our

Please check if you can find an answer in our extensive documentation on PUN.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Hashtable tutorial?

2013-10-20 02:35:14

I need some way to store kills and deaths, SetCustomProperties seems like the way to do it. But I've never really used Hashtables before. Can someone point me to a tutorial or guide. The ones I've found here or on Google give me this error, when I try to SetCustomProperties() . error CS1503: Argument #1' cannot convert System.Collections.Hashtable' expression to type `ExitGames.Client.Photon.Hashtable'

Here is some of my code so far

[code2=csharp]using UnityEngine; using System.Collections;

public class MPKillDeathCountPing : Photon.MonoBehaviour {

}[/code2] Thanks.


2013-10-20 02:37:16

Btw where is code insert in this forum? Don't see it.

2013-10-21 11:50:55

You have to define that you want to use Photon's Hashtable class. This is done by adding a "using" statement at the top of your class. Like so:

[code2=csharp]using UnityEngine; using System.Collections; using Hashtable = ExitGames.Client.Photon.Hashtable;[/code2]

For code insertions: The "full" editor has a drop down "Code". Select your code, then pick the fitting language from the Code dropdown. Keep in mind that less code is better for us to read and answer at all.

2013-10-21 23:40:09

That worked thanks!!

Back to top