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

Author Topic: [resolved] find 1, not find duplicate type  (Read 899 times)

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
[resolved] find 1, not find duplicate type
« on: Jan 15, 13, 12:04:37 AM »

I created 2 windows, 1 at a time.

Both have same DOM values,
     parent GUIMovePanel

Both have same GUI,
HaV_CharBar
    nameLabel

HaV_TargetBar
    nameLabel2


Both have same script,

    method SetName(name as String)
      nameLabel as NodeRef of Class GUILabel = FindGUIControlByName(me,"nameLabel")
      nameLabel.text = name
    .

    method SetName(name as String)
      nameLabel as NodeRef of Class GUILabel = FindGUIControlByName(me,"nameLabel2")
      nameLabel.text = name
    .


Both are called same way,

        statusbar as NodeRef of Class HaV_CharBar = FindGUIControlByName(None, "game.HaV_CharBar" )
        if statusbar != None
          DestroyNode( statusbar )
        .
        statusbar = CreateNodeFromPrototype( "HaV_CharBar" )
        statusbar.build = true
        statusbar.owner = 0


        targetbar as NodeRef of Class HaV_TargetBar = FindGUIControlByName(None, "game.HaV_TargetBar" )
        if targetbar != None
          DestroyNode( targetbar )
        .
        targetbar = CreateNodeFromPrototype( "HaV_TargetBar" )
        targetbar.build = true
        targetbar.owner = 0


Yet 1 will work with the name displayed and other will display a red square.
Code: [Select]
23:35:44: SYSTEM:System:Fantasy Lowlands (9223372055609790087) activate
23:35:44: !ERROR!HeroScript::HeroMachine::ScriptError:GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
23:35:44: !ERROR!System:SCRIPT ERROR: GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
01/14/2013 23:35:47
Call trace:
  Script E_playerAccountClassMethods line 56 me[9223372056184021581]
  Script _playerAccountClassMethods line 21 me[9223372056184021581]
starting method/function _ONREPLICATIONNODEADDED
starting me[id=9223372056184021581 class=E_playerAccount]
23:35:44: !ERROR!HeroScript::HeroMachine::ScriptError:GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
23:35:44: !ERROR!System:SCRIPT ERROR: GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
01/14/2013 23:35:47
Call trace:
  Script _playerAccountClassMethods line 73 me[9223372056184021581]
starting method/function _ONREPLICATIONGROUPADDED
starting me[id=9223372056184021581 class=E_playerAccount]
23:35:44: SCRIPT:[HaV_CharBarClassMethods]:xp: 0
23:35:44: SCRIPT:[HaV_CharBarClassMethods]:last: 250

Looks like it cant find the pointer to Target? Yet both are the same.
« Last Edit: Jan 15, 13, 10:54:56 AM by Thazager »
Logged

JoshHalls

  • Founding Professional
  • *****
  • Posts: 335
    • View Profile
    • The Repopulation
Re: find 1, not find duplicate type
« Reply #1 on: Jan 15, 13, 12:21:42 AM »

Does the 2nd one work if the 1st one is not present?  Redboxes typically meant something wasn't built (looks like you have .build = true so at least that looks good).
Logged
Co-Owner/Programmer - The Repopulation

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: find 1, not find duplicate type
« Reply #2 on: Jan 15, 13, 12:30:27 AM »

Thanks, I have not yet checked that, but will take a look.
I just looked through the actual values in the .xml file separate from the gui editor. Looks like Target did not get the same values there as the other did. Changing those, seemed to fix it. The class was not set.

That also allowed me to fix the other problem, where the GUI was not responding properly. The class was not set.
« Last Edit: Jan 15, 13, 12:40:56 AM by Thazager »
Logged