Check whether in the fxmanifest.lua file you have put the file in which the Config table is included in shared_scripts{}. Also check if it’s okay to use “Config.” or there is another constant
in my script… the line is different
“Config.Houses = houseConfig”
appears on mine as… (works fine)
“Houses = houseConfig”
Have you a config file?
I do yeah
> QB = {}
>
> QB.Spawns = {
> ["legion"] = {
> coords = vector4(189.46, -929.82, 30.69, 236.31),
> location = "legion",
> label = "Legion Square",
> },
> ["mrpd"] = {
> coords = vector4(410.29, -973.57, 29.42, 124.06),
> location = "mrpd",
> label = "Mission Row Police Department",
> },
> ["sspd"] = {
> coords = vector4(1861.27, 3682.43, 33.79, 207.08),
> location = "sspd",
> label = "Sandy Shores Police Department",
> },
> ["vu"] = {
> coords = vector4(115.96, -1283.33, 28.27, 131.9),
> location = "vu",
> label = "Vanilla Unicorn",
> },
> }
and in the client file it looks like this
RegisterNetEvent('qb-houses:client:setHouseConfig', function(houseConfig)
Houses = houseConfig
end)
*I modified my initial locations list from the defaults. Your list will be different
if you wrote that with Houses = houses Config is correct, then it’s fine, but also at the syntax level because the error with Config.Case = houseConfig is normal for it to exist because there is no Config = {} table
exactly right.
“Config.Houses = houseConfig
” is incorrect.
it should be written as “Houses = houseConfig
”
Right, so write simply Houses = houseConfig
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.