MrEvilGamer / qb-weedpicking

A weed picking Script for your server!
24 stars 9 forks source link

Error Spawning Local Object #11

Open Asmoddy opened 2 years ago

Asmoddy commented 2 years ago

Hi there, I have this error whenever I go to the spot where the weed grows.

image

This has something to do with this line

QBCore.Functions.SpawnLocalObject('prop_weed_02', weedCoords, function(obj)

Asmoddy commented 2 years ago

I'm currently using the latest qb core version

MrEvilGamer commented 2 years ago

hi, how about you read the readme file mate :)

Asmoddy commented 2 years ago

I added the functions but since it was the latest qb core and this lines -> QBCore.Functions.Draw2DText = function(x, y, text, scale) gives me error as it seems like it was already obfuscated with the latest version.

Would only work if I changed it to something like -> function QBCore.Functions.Draw2DText(x, y, text, scale)

However the thing is I only got the error from above as changing the function line make it be readable by the latest QBCore as you can see all functions in my core are supposed to be like that.

image

modways commented 2 years ago

This happened to me too. When going over to the location, there is not spawn. SOMETIMES, after a while it does but still. Dont like this and i cant find the fix. Have you figured it out yet? !

maddysinko commented 2 years ago

did you manage to fix the errors because i recently put it on my server havent had errors yet but yeh sometimes in one location the weed takes a bit to appear. also in the weed plant client lua file 101 error you were getting did yours look like this.

function SpawnWeedPlants() while spawnedWeed < 20 do Wait(1) local weedCoords = GenerateWeedCoords()

    QBCore.Functions.SpawnLocalObject('prop_weed_02', weedCoords, function(obj)
        PlaceObjectOnGroundProperly(obj)
        FreezeEntityPosition(obj, true)

        table.insert(weedPlants, obj)
        spawnedWeed = spawnedWeed + 1
    end)
       end
       Wait(45 * 60000)

end

MrEvilGamer commented 2 years ago

Hey mate greetings, You have to read the read me file carefully.

On Sun, Aug 21, 2022, 17:24 maddysinko @.***> wrote:

did you manage to fix the errors because i recently put it on my server havent had errors yet but yeh sometimes in one location the weed takes a bit to appear.

— Reply to this email directly, view it on GitHub https://github.com/MrEvilGamer/qb-weedpicking/issues/11#issuecomment-1221530537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCTUFBJ733QYGPPFKWNWN3V2IKFPANCNFSM5TGSJ3QA . You are receiving this because you commented.Message ID: @.***>