MMOMinion
Teleporting even though its not equal. Confused - Printable Version

+- MMOMinion (https://www.mmominion.com)
+-- Forum: FFXIVMinion (https://www.mmominion.com/forumdisplay.php?fid=87)
+--- Forum: [DOWNLOADS] Addons, Lua Modules, Navigation Meshes.. (https://www.mmominion.com/forumdisplay.php?fid=90)
+---- Forum: I Need Help with LUA coding! (https://www.mmominion.com/forumdisplay.php?fid=104)
+---- Thread: Teleporting even though its not equal. Confused (/showthread.php?tid=19271)



Teleporting even though its not equal. Confused - Damply - 07-23-2017

I have a button that is supposed to teleport you to a map id then walk you to some cords if the map id does not equal the certain id listed. What it actually does is teleport you even if the map id is correct and does not walk you anywhere. I'm not exactly sure whats going wrong with the code but heres the bit of clicking the button.

Code:
function damp.walk()
    if localmapid ~= 129 then Player:Teleport(8) else Player:MoveTo(-247.19,16.20,39.89, followmovement, randomizePaths) end
end

EDIT: I've tried a lot of different ways to do this, I know i have to get the map id and see if its true or false in the code but i dont know what to use to do that. localmapid just returns the number and im not sure how to use that number to make it true or false