iPrestege Posted May 17, 2013 Posted May 17, 2013 the gates table is not exist you have to create it?
WASSIm. Posted May 17, 2013 Author 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
WASSIm. Posted May 17, 2013 Author Posted May 17, 2013 Create a new table . where ? sry but i don't understand the tables
Castillo Posted May 18, 2013 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 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
WASSIm. Posted May 18, 2013 Author Posted May 18, 2013 2: attempt to call global 'getGatesTable' (a nil value)
Castillo Posted May 18, 2013 Posted May 18, 2013 Post your entire script. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 18, 2013 Posted May 18, 2013 Replace: local theGateColID = {} local gateMarkers = getGatesTable () with: addEventHandler ( "onResourceStart", resourceRoot, function ( ) theGateColID = { } gateMarkers = getGatesTable ( ) end ) San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 18, 2013 Posted May 18, 2013 Same error? post the meta.xml. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
WASSIm. Posted May 18, 2013 Author Posted May 18, 2013 >="server.lua" type="server" />="gates.lua" type="server" />>
Castillo Posted May 18, 2013 Posted May 18, 2013 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 18, 2013 Posted May 18, 2013 That's strange, it should work. Question: Why don't you just put it all in the same file? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
WASSIm. Posted May 18, 2013 Author Posted May 18, 2013 That's strange, it should work.Question: Why don't you just put it all in the same file? idk
Castillo Posted May 18, 2013 Posted May 18, 2013 Just put it all on the same file. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
WASSIm. Posted May 18, 2013 Author Posted May 18, 2013 44: attempt to get length of global 'gateMarkers' (a nil value)
Castillo Posted May 18, 2013 Posted May 18, 2013 Post the new code. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted May 18, 2013 Posted May 18, 2013 San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
WASSIm. Posted May 18, 2013 Author Posted May 18, 2013 34: Bad argument @ 'addEventHandler' [Expected function at argument 3, got nil]
Recommended Posts