Roomine Posted August 26, 2017 Posted August 26, 2017 Hi. I have a code, but the code is very wrong. Can somebody correct it? code: dxDrawImage(getScreenFromWorldPosition(getPedBonePosition(headShowingElements[i][1], 8)) - 65 * interpolateBetween(1, 1, 0, 0.15, 0, 0, getDistanceBetweenPoints3D(getCameraMatrix()) / maxDistance, "OutQuad") / 2, getScreenFromWorldPosition(getPedBonePosition(headShowingElements[i][1], 8)) - 65 * interpolateBetween(1, 1, 0, 0.15, 0, 0, getDistanceBetweenPoints3D(getCameraMatrix()) / maxDistance, "OutQuad") / 2, 65 * interpolateBetween(1, 1, 0, 0.15, 0, 0, getDistanceBetweenPoints3D(getCameraMatrix()) / maxDistance, "OutQuad"), 65 * interpolateBetween(1, 1, 0, 0.15, 0, 0, getDistanceBetweenPoints3D(getCameraMatrix()) / maxDistance, "OutQuad"), "files/" .. headShowingElements[i][3] .. ".png", 0, 0, 0, tocolor(255, 255, 255, 255)) What i want: (With going up and down anim from the head) http://imgur.com/a/aHeHL What this code do (why?): http://imgur.com/a/X78mx
Moderators IIYAMA Posted August 27, 2017 Moderators Posted August 27, 2017 Afaik returned arguments from functions do not unpack more than one place, if you placed arguments behind it. function getNewArgumentsFromFunction () return "test1", "test2" end function lastCallFunction (parameter1, parameter2, parameter3) print(parameter1, parameter2, parameter3) end lastCallFunction (getNewArgumentsFromFunction(), "test3") Result: test1 test3 nil To solve that issue, you have to insert them one by one. You have to correct it by yourself. Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
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