• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[JASS] Permanent Texttag problem

Status
Not open for further replies.
Level 4
Joined
Apr 14, 2007
Messages
31
Hello, i have a problem with texttags, the actual code for it is:
local texttag t
local integer w

call CreateTextTagUnitBJ( "TRIGSTR_1665", gg_unit_nwgt_0007, 20.00, 10, 100, 100, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1904", gg_unit_nwgt_0006, 20.00, 10, 0.00, 100.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
.....
the trigger is activated after initialization of the map, but only some of the texttags work, the others dont even show up 14 texttags are used, but often just 4 show up or 1 but jsut when setting a very high delay between, or all texttags are shown but not for all players.

Can someone please help me?
 
Last edited:
Why are you using locals in this case?

JASS:
local integer w = 0 // w must be initialized or you can't say "w = w + 1". You forgot to do so.

set udg_ShopsTTexts[w] = CreateTextTagUnitBJ( "TRIGSTR_1665", gg_unit_nwgt_0007, 20.00, 10, 100, 100, 0.00, 0 )
call SetTextTagPermanentBJ( udg_ShopsTTexts[w], true )
set w = w + 1

set udg_ShopsTTexts[w] = CreateTextTagUnitBJ( "TRIGSTR_1904", gg_unit_nwgt_0006, 20.00, 10, 0.00, 100.00, 0.00, 0 )
call SetTextTagPermanentBJ( udg_ShopsTTexts[w], true )
set w = ( w + 1 )
...
 
the variable texttag and w arent really needed and it still did not work with "local integer w = 0".
I just thought they give a bigger chance to let the texttag stay permanent

function Trig_TTexts_Actions takes nothing returns nothing
local texttag t
local integer w = 0

call CreateTextTagUnitBJ( "TRIGSTR_1665", gg_unit_nwgt_0007, 20.00, 10, 100, 100, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1904", gg_unit_nwgt_0006, 20.00, 10, 0.00, 100.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1905", gg_unit_nwgt_0032, 20.00, 10, 100.00, 0.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1911", gg_unit_nwgt_0031, 20.00, 10, 100.00, 0.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1910", gg_unit_nwgt_0009, 20.00, 10, 0.00, 100.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
call SetTextTagPermanentBJ( t, true )
call CreateTextTagUnitBJ( "TRIGSTR_1909", gg_unit_nwgt_0008, 20.00, 10, 100.00, 100.00, 0.00, 0 )
set t = GetLastCreatedTextTag()
set udg_ShopsTTexts[w] = t
set w = ( w + 1 )
.....


but thanks for your help
 
It can be a gui or jass solution for this bug, it did not work in both it often just show one of about 25 texttags or max 4, which were in the same region, the others just did not get created and in earlier versions where they worked it was possible that they could not be seen by all players somehow
 
Status
Not open for further replies.
Back
Top