-
June 26th, 2020, 01:30 #1
User.isHost has some unexpected behavior for me
[EDIT: TURNS out this was all console logs writing all the logs to one place (host and player)]
As I develop extensions I always run my host, and a player. Two separate instances of the game. One to load the campaign - the other to host.
I was pretty surprised when I put in User.isHost guards in my code and the player instance simply seemed to thing they were the host.
Technically, the user SilentRuin is running both the load campaign and the join. But I was hoping it would tell me who was actually the host (load of campaign). It seems confused since my name is technically both.
Is there a way to truly and absolutely tell the code who is the host and who is the player?Last edited by SilentRuin; June 26th, 2020 at 02:14.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 26th, 2020, 01:33 #2
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,548
I've never seen that before. If that was the case, then a lot of the core ruleset code wouldn't work correctly.
Can you create a minimal extension that recreates the issue?
Regards,
JPG
-
June 26th, 2020, 01:44 #3
Something else must be going on - I was looking at compile logs and it looked like my player was running through all the host calls - but now that I've printed out the isHost value - its doing the right thing. Something else is going on - probably in the stupid category - sorry to have wasted your time. You can delete this thread if you wish.
Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 26th, 2020, 01:50 #4
Wow my compile logs are showing crazy stuff... I've got a DB.handler that i was originally processing only at the host when a database value changed for any character. But then I realized I had to have players check one value so made it happen for everyone, just the players ingored the bulk of the code and only processed one tiny section.
But when I just compiled the logs on the players side I saw this from the debug.console I have at the top of the DB.handlers call (prints out isHost).
[6/25/2020 7:41:51 PM] isHost was false'
... a few other log prints per normal ... then ...
[6/25/2020 7:41:51 PM] isHost was true'
I'll have to add more logs and figure out what is happening.Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 26th, 2020, 02:09 #5
ARRGGHHHH... this is some kind of compile logs artifact I've been churning on. If I compile logs on SilentRuin the player - I see the 4 places I put isHost result logs as false 1st/true 1st/true 2nd/true 3rd/true 4th all in the console log I generated from the player.
Compiled the logs from the host - and got the EXACT some console log.
This is probably because the console log is simply writing everything from my player an host to the same file making my logs useless the way I'm running (sigh).Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 27th, 2020, 01:43 #6
I dont think the console log can differentiate between two instances of FG on teh same computer.
-
June 27th, 2020, 05:45 #7Free(Forums/Forge) Extension(FGU 5E):
Paid (Forge) Extension(FGU 5E):
-
June 27th, 2020, 09:10 #8
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,548
If you're running two copies of FG on the same machine; they are both writing to the same log files, since they both have the same Settings.
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks