View Single Post
12-15-13, 04:50 PM   #1
CrazyCactuaR
A Deviate Faerie Dragon
Join Date: Oct 2011
Posts: 13
Unable to see the problem with my function

Code:
function IAmStill()
	currentSpeed, runSpeed, flightSpeed, swimSpeed = GetUnitSpeed("Player")
	if currentSpeed == 0 then
		return true
	else
		return false
	end
end
iam = {
	still = IAmStill(),
}
Hi all, Hopefully someone can guide my blindness and show me the error of my ways. For some unknown reason i am unable to see why this is incorrectly displaying "true" even when its called when i am moving.

This is called by doing /script print(iam.still())

If i were to do print(IAmMoving()) this would show the correct result. (false when moving, true when still)

Thank you in advance to any whole can solve this annoying problem i have ran into.

Last edited by CrazyCactuaR : 12-15-13 at 04:53 PM.
  Reply With Quote