HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Bug Found in GUI Editor Save Code  (Read 2490 times)


  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Bug Found in GUI Editor Save Code
« on: Mar 04, 17, 09:55:44 PM »

I have noticed that when I use the GUI Editor, if I try to set a texture name into the material field of a control's alphamask AND set that alphamask size or position to anything non-zero, there is an error in the Console panel when I try to save the GUI:

ERROR:HeroScript::HeroMachine::ScriptError:Bad XML: Missing starting <

If I only set the position/size OR only the material, it saves fine.

For instance, setting only material will result in a line like this:
<alphamask material="SomeTexture.png"/>

Setting only size will result in lines like this:
  <size x="213" y="257"/>

But if I set both size and material and try to save, it attempts to write lines like this:
  <size x="213" y="257"/> material="SomeTexture.png"

You can see that the material setting is being placed after the size setting instead of immediately after the keyword "alphamask".  That results in the error since there is no "<" before "material".

I tried to read through the code to understand where it is going wrong, but could not track it down.  Anyways, it can be bypassed by manually writing the code properly in the xml file so that it looks like this:
<alphamask material="SomeTexture.png">
  <size x="213" y="257"/>

Just thought I should pass this along so it can be corrected in-engine at some point.
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.


  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: Bug Found in GUI Editor Save Code
« Reply #1 on: Mar 04, 17, 10:26:18 PM »

That does indeed seem like bad xml. 

I've added it to our issue tracking system, but since there is a workaround editing the guixml directly the priority is lower than other issues without a workaround.

Thanks for letting us know with a good reproduction.


Christopher Larsen