Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Mamul · Nov 26, 2013 at 05:44 PM · photonhash

Problem with hashtables

I'm using Photon and I need to make a hashtable for the customproperties for the room but get these errors.

 Assets/Scripts/MultyPlayer/newMulty.cs(132,39): error CS1502: The best overloaded method match for `PhotonNetwork.CreateRoom(string, bool, bool, int, ExitGames.Client.Photon.Hashtable, string[])' has some invalid arguments
 
 Assets/Scripts/MultyPlayer/newMulty.cs(132,39): error CS1503: Argument `#5' cannot convert `System.Collections.Hashtable' expression to type `ExitGames.Client.Photon.Hashtable'
 
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Roland1234 · Nov 26, 2013 at 06:19 PM

Well, the error itself is self-explanatory: The CreateRoom method is expecting an ExitGames.Client.Photon.Hashtable but you are passing in a System.Collections.Hashtable. It could be that you've upgraded Photon without first deleting the previous version, so you might have old and new files of Photon mixed together. Try deleting the Photon folder and re-importing it and see if that doesn't clear the error. Other than that you'd have to go into more detail and change the type of hashtable that you are passing in to the method.

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Mamul · Nov 26, 2013 at 06:29 PM 0
Share

Thanks I'll give it a try

avatar image Roland1234 · Dec 02, 2013 at 07:06 PM 0
Share

Did that solve your issue?

avatar image EnglishMuffin123 · Dec 07, 2013 at 08:04 AM 0
Share

I have this same problem but I'm using the same photon as I always have. Do I need to do an include? I'm already extending photon.monobehaviour

avatar image AlucardJay · Dec 07, 2013 at 08:14 AM 0
Share

Declare the collection type when you declare the variable :

 var myHashtable : ExitGames.Client.Photon.Hashtable = new ExitGames.Client.Photon.Hashtable();

http://answers.unity3d.com/questions/562204/overload-methods-of-hashtable.html

Edit : sorry, yeah my example is in uJS

avatar image Roland1234 · Dec 07, 2013 at 08:19 AM 1
Share

If you're coding in C# you can alias the types like so:

 using PhotonHashtable = ExitGames.Client.Photon.Hashtable;
 using SystemHashtable = System.Collections.Hashtable;
 
 public class $$anonymous$$yObject
 {
     public PhotonHashtable PhotonHashtableField;
     public SystemHashtable SystemHashtableField;
 }
avatar image
0

Answer by IdrilKalean · May 25, 2017 at 07:10 AM

using Hashtable = ExitGames.Client.Photon.Hashtable;

;D

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Referencing Mecanims Substates 1 Answer

How do I call string to hash on anystate animator controller 0 Answers

Get Photon View Id of gameobject. 2 Answers

Photon Cloud Networking: OnPhotonSerializeView Not Firing 9 Answers

How to add force or velocity to the rigid body? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges