Attempt to index a nil value

 [script:qb-policegara] SCRIPT ERROR: @qb-policegarage/sv_garage.lua:28: attempt to index a nil value (field '?')
[script:qb-policegara] > TriggerCallback (@qb-core/server/functions.lua:88)
[script:qb-policegara] > handler (@qb-core/server/events.lua:201)
[      script:qb-core] SCRIPT ERROR: error object is not a string

line 28 is:
local model = GetHashKey(Config.Garage[name].vehicles[1].model)

config:

What’s wrong here?

1 Like

not the name variable passed with an empty value?

I assume… but how can I solve it? tried 4 ways and nothing helped…

Error is on line 28 not 29

Yeah that’s line 28. my mistake.
local model = GetHashKey(Config.Garage[name].vehicles[1].model)

Yeah it’s difficult to see or solve the issue when we only have a error and no real code (only one line)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.