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

Author Topic: Server-client sync error? requested node ID not found...  (Read 839 times)

K73SK2

  • Developers
  • *
  • Posts: 2
    • View Profile

Ok, so I'm quite new to the HeroEngine here and have been working on getting an inventory going for the game. Upon pressing I, the inventory will open and here, you can open/close different bags that are part of the inventory. Well, I then decided it was time to implement the server-client side of things (since players can add more bags to their own inventory later). Upon creation of the character, the player will by default get a "main bag". This bag is created and is supposed to sync to the client. However, I'm a little lost on how I'm supposed to go about doing this and where I should be programming it into the game. When pushing I, the inventory opens, but the bags are not there and I get the error:

16:20:27: !ERROR!HeroScript::HeroMachine::ScriptError:GOM::getVariableReferenceFromNode (10771): requested node ID (9223372060287021569) not found
16:20:27: !ERROR!System:SCRIPT ERROR: GOM::getVariableReferenceFromNode (10771): requested node ID (9223372060287021569) not found
03/11/2014 16:20:12
Call trace:
  Script G_Inventory_GUIClassMethods line 35 me[id=1000000356 class=G_Inventory_GUI]
  Script G_Inventory_GUIClassMethods line 24 me[9223372059016021638]
  Script G_Inventory_GUIClassMethods line 10 me[9223372059016021638]
  Script Input_Command line 43 me[9223372059016021638]
starting method/function ONCMDSTOP
starting me[id=9223372059016021638 class=G_PlayerAccount,HBNode,CharacterNode,_ACCControllerOwner]


Line 35 of the G_Inventory_GUIClassMethods is:
println( "bag max: " + bag.G_MaximumNumberOfInventoryBagSlots )

This is just for me to test that it's working, but naturally, it's not. What's funny is that this is inside of a loop that loops through all the bags in the players list of bags. So at default, this is just 1 bag. Therefore, the count size of this list of bags is definitely 1, but the reference to the node that contains the actually inventory bag seems to be "vanishing", or I guess a memory leak or something.

I was told to consider the _OnReplicationFieldUpdated method inside of the character creation class... And following the previous code, I did

    is "g_inventorybags"
      $LightweightEvents.raiseLightweightEvent( updateNode, "bagsUpdated", 0 )     
    .


Buuut I don't know where I should be doing a check for bagsUpdated. Or if that is even the "right" code I should be implementing.

So does anyone know what's going on, need more information, or perhaps can point me into some direction that may help me solve my problem?

Thanks!
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1156
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Server-client sync error? requested node ID not found...
« Reply #1 on: Mar 11, 14, 08:58:52 PM »

ScriptError:GOM::getVariableReferenceFromNode (10771): requested node ID (9223372060287021569) not found
This says one of the pointers is not pointing correctly.

Our game is set up a little different. Since each player has so many Inventory slots, I set up the slots and added them to all players. Thus each person can click "open main bag" with 'I'. When they add more bags, its similar to adding items in the bag. Simply keep track of each in a data list. For each bag the player has, draw that many bags in their bag slots. For each item in their bag, get data and draw that item in bag. An example Item tutorial
« Last Edit: Mar 11, 14, 09:00:38 PM by Thazager »
Logged

K73SK2

  • Developers
  • *
  • Posts: 2
    • View Profile
Re: Server-client sync error? requested node ID not found...
« Reply #2 on: Mar 11, 14, 09:08:05 PM »

That actually sounds like a great idea. I'll give it a try the way you mentioned on Thursday, and I'll give that tutorial a try to make it work. If I have any issues, I'll post back in here on Thursday ^^

Thanks.
Logged