esx-framework / esx_property

GNU General Public License v3.0
10 stars 25 forks source link

[Bug] - esx_property- Issue #5

Open Marc85BPG opened 1 year ago

Marc85BPG commented 1 year ago

Describe the bug It is impossible to Give a Key outside of a Property. Logically this isnt the biggest "issue" but.

You still have the Option to give a Key outside. If you press the Button you receive several server-errors.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'any (outside) Position of a House with a second player'
  2. Click on 'Key-Management and Give Key'
  3. See theres nothing happen
  4. See errors serverside (property/server)

Expected behavior If Possible to Give a Key outside of a Property -> it should work Otherwise (ist more logically) hide the Option to Give a Key while outside of a property, to avoid server-errors:

[ script:esx_property] SCRIPT ERROR: @esx_property/server/main.lua:762: attempt to index a nil value (field '?') [ script:esx_property] > TriggerServerCallback (@es_extended/server/functions.lua:167) [ script:esx_property] > handler (@es_extended/server/common.lua:112) [ script:es_extended] SCRIPT ERROR: error object is not a string

Screenshots Not possible atm

Debug Info (please complete the following information):

Additional Context: I already tried the Optimizations from Mycroft in his PR`s - but its not a solution. If i apply his code - esx_property is complete broken