5E Character Create Playlist
  1. #1

    User.getCurrentyIdentity() and User.getIdentityLabel() not working... sometimes.

    In my code, I have:

    Code:
    	local sSender;
    	local sSenderID;
    	if User.isHost() then
    		sSenderID = "";
    		sSender = "GM";
    	else
    		sSenderID = User.getCurrentIdentity();
    		Debug.console("Just after getCurrentIdentity: ", sSenderID);
    
    		sSender = User.getIdentityLabel();
    		Debug.console("Just after getIdentityLabel: ", sSender);
    	end
    When the host executes this, sSenderID always ends up being "" and sSender always ends up as "GM". Excellent, the User.isHost() portion works flawlessly.

    When I connect with a localhost copy of the client, sSenderID always ends up being the correct ID for the currently selected character in that copy of the localhost client and sSender ends up as that character's name. Perfect.

    However, when a non-host, non-localhost client runs this code, sSenderID=User.getCurrentIdentity(); ends up with sSenderID == nil, and the sSender = User.getIdentityLabel(); line errors out with the error "...getIdentityLabel: Invalid argument".

    1. Why is sSenderID = User.getCurrentIdentity(); returning nil when a client runs it?

    2. Why is sSender = User.getIdentityLabel(); crapping out when a client runs it? (Yeah, I know, User.getCurrentIdentity() is returning nil so that must be it, but just in case it isn't....)

    (btw: I have similar code in another place and it always works: )
    Code:
    local currentID;
    currentID = User.getCurrentIdentity();
    This really makes no sense why it works in one place and not another.

    Thanks!
    Last edited by zuilin; October 19th, 2020 at 07:48. Reason: typo

  2. #2
    As of this morning, without any code changes, it works. Literally, no code changes. I just sparked up all three copies, did my exact same test again, and now, no errors.

    Go figure.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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
  •  
DICE PACKS BUNDLE

Log in

Log in