Thread: Always The Client??
-
July 30th, 2022, 02:29 #1
- Join Date
- Mar 2020
- Location
- Sydney, Australia
- Posts
- 247
Always The Client??
Greetings,
First off I am using the Mac OS version of FGU as my main Fantasy Grounds.
I have resumed working on an extension that does different things based on if the user is the GM (Host?) or a Player (Client?).
To this end I am using Session.IsHost to differentiate the two entities.
However when I start FGU in either the LAN or Cloud versions, the first instance that I start thinks that it is a Client (Session.IsHost is false), thus defeating the purpose of detecting which is a Host and which is a Client.
Am I doing this incorrectly? Or is there some other way of doing this?
I could have sworn this was working correctly a couple of versions ago.
DThanks In Advance,
D
-
July 30th, 2022, 09:09 #2
I don't know but would the first instance be the client until another instance joins when it would become the host?
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php
-
July 30th, 2022, 11:10 #3
- Join Date
- Mar 2020
- Location
- Sydney, Australia
- Posts
- 247
Then it defeats the purpose of "Load Game" versus "Join Game" in the initial interface.
If I Load Game then I am intending to Host the game (or work on my development campaign) whereas if I Join Game I am intending to be a Client.
This is how it used to work (maybe 2 or 3 updates ago).
My extension checks to see if it is a Host or a Client to present settings (to Host only) and display the choices made (to Clients) so it is important to see which mode it is running in.
This is already done in the normal barebones version of FGU - some options are GM only for example.
Unless it is the ruleset I am using ... I should check that ... hmmm.
Just checked it with another ruleset and I am getting the same results.
The code I am using for checking this is quite straight forward ...
Code:if not Session.isHost then Debug.chat("I AM THE CLIENT!!!!") else Debug.chat("I AM THE HOST!!!!") end
Okay you can ignore this completely now ... turns out I spelt Session.IsHost with a small 'i' instead of the capital. It was so easy to skip over when just reading lines of code.
Issue resolved.Last edited by UrsaTeddy; July 30th, 2022 at 13:37. Reason: Found My Issue
Thanks In Advance,
D
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks