Lua Code:
local function IAmStill()
local currentSpeed = GetUnitSpeed("player")
if (currentSpeed == 0) then
return true
else
return false
end
end
IAm = {
still = IAmStill
}
1) "Player" isn't a valid UnitID, "player" is.
2) Make
IAmStill local.
3) IAm.still needs to be a function reference, not the return of a function (denoted by
()).
4) I don't condone making
IAm global, nor do I condone the way you are calling the function, but I am hoping that it is a crude test and that you intend to localize the table and call it in a better way.
/run print(IAm.still()) should work.