- Joined
- Jan 4, 2010
- Messages
- 14
I'm puzzled about creating local variables. These 2 lines are what is causing the following 2 errors. It seems alright to me, I even searched google and sites like this and this is how people do it.
I just want to get a local variable so I can do stuffs with the floating text without it being a global variable.
Expected 'endif'
Expected a variable name
Full function
I just want to get a local variable so I can do stuffs with the floating text without it being a global variable.
Expected 'endif'
Code:
local texttag LastTextTag = CreateTextTag()
Expected a variable name
Code:
set LastTextTag = GetLastCreatedTextTag()
Full function
Code:
function Trig_Show_Gold_Gained_or_Lost_Copy_Actions takes nothing returns nothing
if ( Trig_Show_Gold_Gained_or_Lost_Copy_Func001C() ) then
call CreateTextTagLocBJ( ( "+" + I2S(udg_tempInt) ), udg_tempPoint, 0, 10, 100, 100, 0.00, 0 )
else
if ( Trig_Show_Gold_Gained_or_Lost_Copy_Func001Func001C() ) then
call CreateTextTagLocBJ( ( "+" + I2S(udg_tempInt) ), udg_tempPoint, 0, 10, 0.00, 100, 0.00, 0 )
else
if ( Trig_Show_Gold_Gained_or_Lost_Copy_Func001Func001Func001C() ) then
call CreateTextTagLocBJ( ( "-" + I2S(udg_tempInt) ), udg_tempPoint, 0, 10, 100, 0.00, 0.00, 0 )
else
endif
endif
endif
local texttag LastTextTag = CreateTextTag()
set LastTextTag = GetLastCreatedTextTag()
endfunction