WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   If Statement Trouble (https://www.wowinterface.com/forums/showthread.php?t=33978)

MrLulz 07-16-10 12:27 AM

If Statement Trouble
 
So I have this if statement:
Code:

local isBuffed1,_,_,_,_,_,_,isMine1 = UnitAura("Player","Battle Shout");
local isBuffed2,_,_,_,_,_,_,isMine2 = UnitAura("Player","Commanding Shout");
if((isBuffed1 ~= nil and isBuffed2 ~= nil) or isMine1 == "PLAYER" or isMine2 == "PLAYER") then
        bString = bString.."\nTest :O"
else
        bString = bString.."\nShout"
end

It's only half working, and I guess I'm to dumb to notice why. :P

Basically, the problem is that the vars "isMine1" and "isMine2" are giving me trouble. If I go in game, cast a shout on myself, and then print the var it returns "PLAYER". However, in the if statement I can never get either one to return true for isMine1 == "PLAYER"

Anyone notice what I'm doing wrong, cause I'm stumped. =/

p3lim 07-16-10 01:18 AM

"PLAYER" should be lowercase, "player"

MrLulz 07-16-10 01:50 AM

Hmm, I had "Player" but then tried all caps since it was printing in all caps but that worked.

Thanks. :D

Edit: I'm stupid, the font I was using prints in all caps. xD


All times are GMT -6. The time now is 07:31 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI