Skip to content
This repository has been archived by the owner on Aug 10, 2024. It is now read-only.

error after delivery #147

Open
dim62 opened this issue Aug 14, 2023 · 0 comments
Open

error after delivery #147

dim62 opened this issue Aug 14, 2023 · 0 comments

Comments

@dim62
Copy link

dim62 commented Aug 14, 2023

SCRIPT ERROR: @renzu_shops/client/main.lua:1526: attempt to concatenate a nil value (field '?')

fn (@renzu_shops/client/main.lua:1526)

I looked at the problem with deliveries
trucks spawn as 'item' all the time
type == 'vehicle' doesn't work for the vehicle shop we need 'vehicle' and not 'item'.
if anyone knows how to fix this if I find the solution I'll post it here

help us renzuzu please

self.StartDelivery = function(var)
self.deliverydata = var
CreateThread(function()
local data = var.data
local success = lib.callback.await('renzu_shops:startdelivery', false, var)
if success == 'alreadyongoing' then
self.SetNotify({
title = 'Store Business',
description = 'You have ongoing Delivery',
type = 'error'
})
return
end
local type = var.type or 'item'
self.shoptype = type
local label = self.Items[data.item.name] or data.item.label
local spawn = shared.shipping.spawn
local model = shared.shipping.model[type]
if var.selfdeliver then
spawn = var.selfdeliver.coord
model = var.selfdeliver.model
end
lib.requestModel(model)
SetModelAsNoLongerNeeded(model)
self.Vehicle = CreateVehicle(model, spawn.x,spawn.y,spawn.z, spawn.w, true, true) -- Spawns a networked self.Vehicle on your current coords
while not DoesEntityExist(self.Vehicle) do Wait(1) end
if type == 'vehicle' then
self.pickupzone = self.Add(data.point,'Pick Up '..label,self.DelivertoVehicleShop,false,var,false)
else
self.pickupzone = self.Add(data.point,'Pick Up '..label,self.DelivertoStore,false,var,false)
end
shared.VehicleKeys(GetVehicleNumberPlateText(self.Vehicle))
truckblip = AddBlipForEntity(self.Vehicle)
self.SetBlip(truckblip,477,26,'My Delivery Truck')
DoScreenFadeIn(333)
SetNewWaypoint(vec3(data.point[1],data.point[2],data.point[3]))
deliveryblip = AddBlipForCoord(data.point[1],data.point[2],data.point[3])
self.SetBlip(deliveryblip,358,26,'My Pick Up Point')
SetBlipRoute(deliveryblip,true)
SetBlipRouteColour(deliveryblip,3)
self.SetNotify({
title = 'Store Business',
description = 'Go to the Pick Up Location and Pick Up The Item',
type = 'inform'
})
Wait(1000)
end)
end

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant