Starfinder Playlist
  1. #1

    DB.isOwner returning false unexpectedly

    I have a client connected with two characters in their possession and added to the CT (added after the client took ownership). I am trying to use DB.isOwner to determine if the OOB recipient is the owner of the active CT token:
    Code:
    function toggleSelectedToken(bSelect)
        local nodeActive = CombatManager.getActiveCT();
        Debug.chat('rcv token select', bSelect, nodeActive, DB.isOwner(nodeActive));
    
        if not DB.isOwner(nodeActive) then
            return;
        end
    -- etc.
    However, in this screenshot, you can see when it becomes Turgarth's turn, DB.isOwner returns false instead of the expected true. (The first debug print is from my "deselect Aris on his turn end" logic.) This is from the client's view.
    owner1.jpg

    And from the host view, you can see "anathemort" is the owner of both characters.
    owner2.jpg

    Did I get something wrong here? Thanks!

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,362
    Only the GM owns database nodes in the combat tracker. Check the database node your code is looking at in db.xml - you'll see there's no <holder> tag, which will indicate who is the owner (assuming the owner="true" property is used as part of the <owner> tag), as only the GM owns the data in the database.

    If you want to see who owns the character, you'll need to look at the <charsheet> entry for the PC, not the combat tracker entry.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  3. #3
    Thanks very much Trenloe, that is clarifying

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in