Jump to content

(Solved)I got error i don't know why (?)


KariiiM

Recommended Posts

Hey guys,

today i was scripting something for fun everything is fine exept this part of the code:

the Warning is: Bad argument @ 'attachElements' [Expected element at argument 2,got boolean]

the argument 2 it's myVeh

local myVeh = getPedOccupiedVehicle (source) 
    attachElements ( Box, myVeh , 0.25, -2.3, -0.5, -0.5, 0, 0 ) 

~Thanks in advance.

Edited by Guest
Link to comment

Never mind i solved it :), i just forgot to check if the player is occupied to the vehicle like that for the people who get like this problem in future

if getPedOccupiedVehicle (source) then 
local myVeh = getPedOccupiedVehicle (source) 
attachElements ( Box, myVeh , 0.25, -2.3, -0.5, -0.5, 0, 0 ) 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...