This function retrieves the display name for the specified user ID.
Parameter | Description |
---|---|
userid | user ID to return the name of |
Returns the user's display name.
-- Initialize Steam
if not Steamworks.Initialize() then
RuntimeError("Steamworks failed to initialize.")
return
end
-- Get and print Steam information
Print("App ID: " .. String(Steamworks.GetAppId()))
Print("Build ID: " .. String(Steamworks.GetBuildId()))
-- Get user information
local userId = Steamworks.GetUserId()
Print("User ID: " .. String(userId))
Print("User name: " .. Steamworks.GetUserName(userId))
-- Shutdown Steam
Steamworks.Shutdown()