MQ2Hud - 09/05/2008

alez

Member
Joined
Jul 27, 2008
Messages
98
Reaction score
1
Points
6
I figured I would start a new thread. I have been crashing to desktop since the source was released. Found one of the culprits:

This line in the MQ2Hud.ini will immediately CTD:
Code:
GroupLeader=3,760,74,255,255,255,${If[${Group},Group Leader : ${Group.Leader.Name},]}

As of today the:
Code:
GameTime=3,160,50,255,255,255,GameTime: ${GameTime.Hour}:${GameTime.Minute} - ${If[${String[${GameTime.Night}].Equal["TRUE"]},Night,Day]}

Returns an error:
"Due to complete misuse of String Top-Level Object, it has been removed"

It also seems that any AA Ability outside of Veteran's aa's in the syntax like:
Code:
ExultantBellowingready=3,260,218,0,255,0,${If[${String[${Me.AltAbilityReady[Exultant Bellowing]}].Equal["TRUE"]},Ready,]}

Returns the same error:
"Due to complete misuse of String Top-Level Object, it has been removed"

This is strange because this is the exact same syntax used for Veteran's abilities...

I will let you know if I find anything else.
 
Which compile is that on? I thought I had removed that line from my compile, but it may have 'sneaked' back in.
 
No it was in my personal compile. It was part of a hud I got from here though.
 
You will need to change the String structure tio be able to use those statements.

Code:
TLO(dataString)
{
   WriteChatf("Due to complete misuse of the String Top-Level Object, it has been removed.");
   return false;
   /*
   if (!ISINDEX())
      return false;
   strcpy(DataTypeTemp,szIndex);
   Ret.Ptr=&DataTypeTemp[0];
   Ret.Type=pStringType;
   return true;
   /**/
}

to

Code:
TLO(dataString)
{
   if (!ISINDEX())
      return false;
   strcpy(DataTypeTemp,szIndex);
   Ret.Ptr=&DataTypeTemp[0];
   Ret.Type=pStringType;
   return true;
}
 
Excellent. I will give that a shot!

Thanks
 
Couple of years ago the MQ2 devs took out the TLOs from their source. Your HUD isn't broken, it's just that the compile you're using hasn't had the TLO structs rolled back to allow their misuse again :)