Jump to content

ipairs, table expected got nil

Recommended Posts

I will type "/ search" on the server and cameraTarget appears on the client but, taking the camera position on the server, i get "ipairs,  table expected got nil"

function engineobj ( message, sasr )
      for k,v in ipairs ( objs,"sasr" ) do
        if k == objs then
             outputChatBox ( "#FF0000CAM: " ..message.."", 255 ,255 ,255, true)
      local px, py, pz = getElementPosition ( isElement(sasr))

                              setCameraTarget ( px, py, pz[k])

                              outputConsole ( "CAMC: " ..px.. " " ..py.. " " ..pz )
     if not ( (k) "sasr" ) then
             outputChatBox ( "#FF0000*Not Object available*", getRootElement(), 255, 255, 255, true )
addEvent( "onSearch", true )
addEventHandler( "onSearch", resourceRoot, engineobj )


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