• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Solved] Loss of String Case

Status
Not open for further replies.
Level 13
Joined
Jul 26, 2008
Messages
1,009
Hi!

I'm currently trying to save string to a unit (Using AutoIndex) and then when a player patrols that unit they see the string in a text-tag. Easy nuff.

Problem is the case becomes all lowercase.

My process:

JASS:
//SAVING THE STRING TO A UNIT GROUP
 //Checking what a player typed
    if SubString(str, 0, 4) == "info" then
        if (SubString(str,4,5) == " ") then
            set udg_TEMP_String = SubString(str,5,StringLength(str))
        else
            set udg_TEMP_String = SubString(str,4,StringLength(str))
        endif
        call GroupEnumUnitsSelected(ENUM_GROUP, pl, function InfoTag)

//The grouping function
function InfoTag takes nothing returns boolean
    set Info[GetUnitId(GetFilterUnit())] = udg_TEMP_String
 return false
endfunction

//This happens when you patrol a unit
        set tag = CreateTextTag()
        if GetLocalPlayer() == GetOwningPlayer(GetTriggerUnit()) then
            set str = Info[GetUnitId(GetOrderTargetUnit())]
        else
            set str = " "
        endif
        call SetTextTagText(tag, str, (12*0.023/10))
        call SetTextTagPosUnit(tag, GetOrderTargetUnit(), 8.00)
        call SetTextTagLifespan(tag, StringLength(str)*0.22 - 4*(StringLength(str)/120) )
        call SetTextTagPermanent(tag, false)
        call SetTextTagVisibility(tag, true)
        call IssueImmediateOrder(GetTriggerUnit(), "stop")

Basically it shows the text tag, but it shows it in Lower-Case instead of the proper casing used when the player created the text tag.

So, how do I get it to retain it's proper text case?
 
Status
Not open for further replies.
Top