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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - K73SK2

Pages: [1]
1
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!

Pages: [1]