3B00DG4MER Posted August 27, 2014 Share Posted August 27, 2014 Hi Guys today i was Editing On GPS Resource (included With MTA SA Resources) i've added That Function to "Client.lua" function calculateRoute(tox, toy, toz) local x,y,z = getElementPosition(getLocalPlayer()) local path = server.calculatePathByCoords(x, y, z, tox, toy, toz) for i,node in ipairs(path) do createMarker(node.x, node.y, node.z, 'corona', 5, 50, 0, 255, 200) addLinePoint ( node.x, node.y ) end end if i Call The Shared Function into Another Resource: exports[ "gps" ].calculateRoute(100,100,10 ) it's Debug attempt to yield across metamethod\C-call boundary Failed To Call 'gps:calculateRoute' gps\until.lua:5:bad argument #1 to '_resume' (coroutine expected) Link to comment
3B00DG4MER Posted August 28, 2014 Author Share Posted August 28, 2014 Post gps\until.lua https://code.google.com/p/mtasa-resources/source/browse/trunk/%5Bgameplay%5D/gps/util.lua Link to comment
3B00DG4MER Posted August 28, 2014 Author Share Posted August 28, 2014 I fixed It I don't know Why,but it's works only but a Event or A Command, Thanks Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now