iPrestege Posted May 17, 2013 Share Posted May 17, 2013 the gates table is not exist you have to create it? Link to comment
WASSIm. Posted May 17, 2013 Author Share Posted May 17, 2013 the gates table is not exist you have to create it? local getTable = { {2990, 1284.2, -2056.4, 61.7, 0, 0, 90, 1284.2, -2056.4, 61.7, 2000, 10, "N..S.E", "N..S.E"}, function getGatesTable () return getTable end Link to comment
iPrestege Posted May 17, 2013 Share Posted May 17, 2013 I Mean at line 22 gates return to a nil value . Link to comment
WASSIm. Posted May 17, 2013 Author Share Posted May 17, 2013 Create a new table . where ? sry but i don't understand the tables Link to comment
Castillo Posted May 18, 2013 Share Posted May 18, 2013 You're simply using the wrong name. This: for ID=1,#gates do should be: for ID=1,#gateMarkers do for ID=1,#gateMarkers do local object, x, y, z, int, dim = gateMarkers[ID][1], gateMarkers[ID][2], gateMarkers[ID][3], gateMarkers[ID][4], gateMarkers[ID][5], gateMarkers[ID][6] local theGateCol = createColSphere(x, y, z, gateMarkers[ID][12]) local theGate = createObject (object, z, y, z, gateMarkers[ID][5], gateMarkers[ID][6], gateMarkers[ID][7]) theGateColID[theGate] = ID addEventHandler("onClientColShapeHit", theGateCol, gateOpen) addEventHandler("onClientColShapeLeave", theGateCol, gateClose) end Link to comment
WASSIm. Posted May 18, 2013 Author Share Posted May 18, 2013 2: attempt to call global 'getGatesTable' (a nil value) Link to comment
Castillo Posted May 18, 2013 Share Posted May 18, 2013 Replace: local theGateColID = {} local gateMarkers = getGatesTable () with: addEventHandler ( "onResourceStart", resourceRoot, function ( ) theGateColID = { } gateMarkers = getGatesTable ( ) end ) Link to comment
Castillo Posted May 18, 2013 Share Posted May 18, 2013 Same error? post the meta.xml. Link to comment
WASSIm. Posted May 18, 2013 Author Share Posted May 18, 2013 >="server.lua" type="server" />="gates.lua" type="server" />> Link to comment
Castillo Posted May 18, 2013 Share Posted May 18, 2013 That's strange, it should work. Question: Why don't you just put it all in the same file? Link to comment
WASSIm. Posted May 18, 2013 Author Share Posted May 18, 2013 That's strange, it should work.Question: Why don't you just put it all in the same file? idk Link to comment
Castillo Posted May 18, 2013 Share Posted May 18, 2013 Just put it all on the same file. Link to comment
WASSIm. Posted May 18, 2013 Author Share Posted May 18, 2013 44: attempt to get length of global 'gateMarkers' (a nil value) Link to comment
WASSIm. Posted May 18, 2013 Author Share Posted May 18, 2013 34: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil] Link to comment
Recommended Posts