Jump to content

Problem with Pulling data or something of another

Recommended Posts

Somehow this does not want to unpack properly yet, does at the same time..

local resppos = getElementData(theVehicle, "respawnposition") 
local x, y, z, rx, ry, rz = unpack(resppos) 

What I mean by this is, if I debug and tell it to output: "outputDebugString(x.." "..y.." "..z)" it outputs all the data.

I even did

if not x or not y or not z or not rx or not ry or not rz then 
outputDebugString("This is the issue here.") 

and nothing was output so I put

outputDebugString("This is somehow the issue.") 

and it output the data there.

And when I look at the debug in game without any other debug I get this

ERROR: bad argument #1 to 'unpack' (table expected, got boolean) 

Link to comment

If getElementData isn't returning a boolean, that error is impossible based on the code you've posted. As the error message says, unpack is getting a boolean, which means that that's what you got out. It's really hard to say any more without seeing more code.

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...