esx-framework / esx_core

Official Repo For core resources for esx-legacy
https://documentation.esx-framework.org/
GNU General Public License v3.0
362 stars 734 forks source link

[Bug] - esx_core - ESX.PlayerData.name retunr nill #1386

Closed DyroS3 closed 1 month ago

DyroS3 commented 1 month ago

Describe the bug When trying to use ESX.PlayerData.name, the return value is nil

To Reproduce

RegisterCommand('ESX.PlayerData.name', function(source, args, raw)
  local ESX = exports['es_extended']:getSharedObject()

  print('ESX.PlayerData', ESX.DumpTable(ESX.PlayerData))
  print('ESX.PlayerData.name', ESX.PlayerData.name) -- retrun nil
end, false)

Screenshots image

Debug Info (please complete the following information):

Additional context When I look at the values printed by ESX.DumpTable(ESX.PlayerData), I see that there is no name header, and when I look at the kernel I see that server - main.lua finds that userData does not have a value for name. Is ESX.PlayerData.name being dropped? image

Gellipapa commented 1 month ago

@DyroS3 Hi! Thanks for report problem. I corrected it, the error was that there was a refactor and the name value was not entered and therefore the player data was not received.