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

Author Topic: [Fixed in Upcoming Package] Area states system issues  (Read 5530 times)

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
[Fixed in Upcoming Package] Area states system issues
« on: Jan 17, 13, 10:42:40 PM »

I have used the area states system to add a lever and door that where connected in the past, but I seem to be having a number of issues with re-creating it now.

1. When I use the "Link" button in the area states editor I am getting the following error in chat:

Code: [Select]
[ServerScreamer] problem processing remote call from client [account=ALAN.MO.1978@GMAIL.COM]:  fromScript=_StatesClassMethods fromFunction=_requestLinkStateToSeletedNode exception="'_statesClassMethods:RemoteRequestLinkStateToSeletedNode' not found"
The script and function do exist so I'm unsure on this?

2. Whenever I add a transformation to a state the editor tells me that the format of my time interval is wrong even though it is in the correct format

Code: [Select]
Invalid data in _stateActionDelayInterval. "0:00:00.000" doesn't match TimeInterval format: "hh:mm:ss.sss" or "00:00:01.000"
I seem to get this message whenever there is a TimeInterval involved like a delay, even if I do not change the format supplied in the form.

3. I have created a LEVER state with ON/OFF values and TURNINGOFF/TURNINGON transitions (setstate), it has the following library command for the lever model in the library:

Code: [Select]
/hestates ?guids='$GUIDS' #spec='LEVER' ?statefulobject='simplestaticlever.hgm' statetype='_areaStates'
When I try to add it from the library I get this error:

Code: [Select]
[hsl_error] 9223372057975021938,0: [world map] SCRIPT ERROR: GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
01/18/2013 04:35:59 UTC
Call trace:
  Script _statefulObjectActionSetStateClassMethods line 15 me[id=9223372060559027723 class=_statefulObjectActionSetState]
  Script _statefulObjectStateClassMethods line 205 me[id=9223372060559027695 class=_statefulObjectState]
  Script _statefulObjectSpecClassMethods line 227 me[id=9223372056797023295 invalid]
  Script _StatesClassMethods line 113 me[9223372060559022444]
  Script _CommandHandlerClassMethods line 47 me[9223372060559022444]
starting method/function _PROCESSCOMMAND
starting me[id=9223372060559022444 class=_CommandHandler]

I can instantiate a stateful door and the right click menu works but it does not transform (turn 90 degrees) when I change the state with that right click menu, physics and mouse interaction seem correct...but nothing happens

Are these errors due to something I'm doing? I'm confused because I had these systems working previously and now I can't seem to get them working...
« Last Edit: Jan 28, 13, 02:58:53 PM by HE-HERB »
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1160
  • Never stop learning
    • View Profile
Re: Area states system issues
« Reply #1 on: Jan 18, 13, 12:10:52 AM »

Just an observation, but not totally sure myself, as I have not tried these yet.

2. "0:00:00.000" doesn't match  "hh:mm:ss.sss"  missing 1 'h' upfront?

3. SCRIPT ERROR: GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
This means your pointer is not looking at the right location. Perhaps its looking at the child or possibly the parent node instead of the it needs.
Logged
Lead scripter for EO, Repop helper.
HSL Video tutorials:
https://community.heroengine.com/forums/index.php/topic,1719.msg36858.html#msg3685

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #2 on: Jan 18, 13, 03:22:12 AM »

Just an observation, but not totally sure myself, as I have not tried these yet.

2. "0:00:00.000" doesn't match  "hh:mm:ss.sss"  missing 1 'h' upfront?

3. SCRIPT ERROR: GOM::getVariableReferenceFromNode (10773): requested node ID (0) not found
This means your pointer is not looking at the right location. Perhaps its looking at the child or possibly the parent node instead of the it needs.

Thanks Thazager, I hadn't noticed the missing 0 at the beginning because that was originally the sequence in that field...
unfortunately even after changing it to hh:mm:ss.sss (by adding the preceding 0), I am still getting the same error when I try to save,
but now they are actually in the same format, in fact it won't even add the preceding 0 because it throws an error about incorrect formatting.

I'll look into your idea for 3, since this happens when trying to add a node from the library I'm unsure what other node it could be looking at... back to the blade for tests...
« Last Edit: Jan 18, 13, 03:25:32 AM by Sands_Dethston »
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: Area states system issues
« Reply #3 on: Jan 18, 13, 09:35:59 AM »

1.
Quote
The script and function do exist so I'm unsure on this?
Just to be thorough, for those scripts, you not only compiled them but also successfully submitted them?
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #4 on: Jan 19, 13, 01:00:19 AM »

The script and function that the error says are missing are HE engine scripts

_statesClassMethods:RemoteRequestLinkStateToSeletedNode

I checked to see that the script and the function existed... I did just notice however that there is a spelling mistake in that message as above the c is missing in selected (I copied the script and function names from the error message).. I'm checking this in heroblade now...

Edit: I just checked in heroblade and it looks like there is a spelling mistake on that remote call as shown above, the 'c' is missing from 'selected'. I have fixed the spelling mistake and tested again and the link button now works correcty. 1 problem solved, other people may need to change this script to get it to work too as this was the default _stateClassMethods script on my world.
« Last Edit: Jan 19, 13, 01:07:29 AM by Sands_Dethston »
Logged

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #5 on: Jan 19, 13, 11:21:22 PM »

Mine was spelt correctly in _statesclassmethods on the server, but not on the client. My _GUIEditStatesInterfaceClassMethods was also spelt incorrectly, but because the server one was correct both of these were throwing errors.
Logged

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #6 on: Jan 20, 13, 02:46:20 AM »

Mine was spelt correctly in _statesclassmethods on the server, but not on the client. My _GUIEditStatesInterfaceClassMethods was also spelt incorrectly, but because the server one was correct both of these were throwing errors.

I am actually Talking about RemoteRequestLinkStateToSeletedNode here, my server side script hasn't been modified by me and has the correct spelling, client had the 'c' missing...

The mistake in _GUIEditStatesInterfaceClassMethods:_requestLinkStateToSeletedNode is fine because the function in _statesclassmethods client side is spelt the same way. I was getting an error because I modified the client function name when I should not have

So in the end I have only modified Client side _statesclassmethods:RemoteRequestLinkStateToSeletedNode to match the server side function _statesclassmethods:RemoteRequestLinkStateToSelectedNode by adding the 'c'
« Last Edit: Jan 20, 13, 02:50:02 AM by Sands_Dethston »
Logged

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: [Resolved] Area states system issues
« Reply #7 on: Jan 22, 13, 11:12:30 PM »

Only one out of three of these problems are resolved...  :(

Am I the only one getting this issue?

Quote
Whenever I add a transformation to a state the editor tells me that the format of my time interval is wrong even though it is in the correct format

Code: [Select]
Invalid data in _stateActionDelayInterval. "0:00:00.000" doesn't match TimeInterval format: "hh:mm:ss.sss" or "00:00:01.000"
I seem to get this message whenever there is a TimeInterval involved like a delay, even if I do not change the format supplied in the form.

I still have this problem, and I don't know if this problem is preventing my Lever/Door setup from working. It doesn't matter if I change it to the correct format, I still have the problem.

Adding to this the Edit State button on the states menu (right click) is not working

I also still have the 3rd error... therefore I don't feel like this is resolved...
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: [Resolved] Area states system issues
« Reply #8 on: Jan 23, 13, 05:18:23 AM »

After some investigation, here's the cause of #2.

I searched for that error message and found it in method _updateNodeFieldWithCellValue( ) of _GUINodePropertyEditorCellTextInputBoxClassMethods.  Here's the code in question:
Code: (hsl) [Select]
        is "timeinterval"
          if ( StringIsTimeInterval( inputBox.value ) )
            t as TimeInterval = inputBox.value
            currentT as TimeInterval = theNode.fieldCollection[ me._GUINodePropertyEditorCellFieldName ]
            if currentT <> t
              theNode.fieldCollection[ me._GUINodePropertyEditorCellFieldName ] = t
          else
              $ALERT._CleanModalAlert( "Invalid data in " + me._GUINodePropertyEditorCellFieldName + ". $Q" + inputBox.value + "$Q doesn't match TimeInterval format: $Qhh:mm:ss.sss$Q or $Q00:00:01.000$Q" )
            .
          .
        .
Which makes it look like the alert should only come up when the value is not a time interval, however the value clearly is in the proper format.  Also, the value is properly saved even when the alert comes up.  Placing a println() after the line testing if it is a time interval showed that it was indeed going to that section properly, but for some reason it was still showing the alert.

Looking at the code, you can see the if-block dots are incorrectly placed.  The indenting makes it look like the else belongs to the time interval check, but it is actually matched with the "currentT <> t" line.  Pressing F6 to correctly indent makes it more apparent:
Code: (hsl) [Select]
        is "timeinterval"
          if ( StringIsTimeInterval( inputBox.value ) )
            t as TimeInterval = inputBox.value
            currentT as TimeInterval = theNode.fieldCollection[ me._GUINodePropertyEditorCellFieldName ]
            if currentT <> t
              theNode.fieldCollection[ me._GUINodePropertyEditorCellFieldName ] = t
            else
              $ALERT._CleanModalAlert( "Invalid data in " + me._GUINodePropertyEditorCellFieldName + ". $Q" + inputBox.value + "$Q doesn't match TimeInterval format: $Qhh:mm:ss.sss$Q or $Q00:00:01.000$Q" )
            .
          .
        .

The block below it shows how the if-statement dots should be:
Code: (hsl) [Select]
        is "datetime"
          if ( StringIsDateTime( inputBox.value ) )
            dt as DateTime = inputBox.value
            currentDT as DateTime = theNode.fieldCollection[me._GUINodePropertyEditorCellFieldName]
            if currentDT <> dt
              theNode.fieldCollection[me._GUINodePropertyEditorCellFieldName] = dt
            .
          else
              $ALERT._CleanModalAlert( "Invalid data in " + me._GUINodePropertyEditorCellFieldName + ". $Q" + inputBox.value + "$Q doesn't match DateTime format: $Qmm/dd/yyyy hh:mm:ss$Q or $Q09/20/2000 12:15:30$Q" )
          .
        .

So at least that is an easy fix which can be put in for now and added to an engine update in the future, along with the spelling corrections you pointed out above, which should really be corrected on both the server and client side.  As to #3, not sure, yet.
« Last Edit: Jan 23, 13, 05:20:01 AM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #9 on: Jan 24, 13, 06:28:18 AM »

Thanks very much for the answer to #2   :D

I'm trying it now and I'll edit with results.

Edit: This solution works. Thanks very much Scott :D 
« Last Edit: Jan 24, 13, 06:36:55 AM by Sands_Dethston »
Logged

Sands_Dethston

  • World Owners
  • ****
  • Posts: 44
    • View Profile
Re: Area states system issues
« Reply #10 on: Jan 24, 13, 06:51:15 AM »

I can now link my states to a prop (from the spec oracle) and get a state menu (right click) to pop from the prop, but none of the options on the menu are currently doing anything, even Edit State, which is supposed to open the menu, is doing nothing. I can select the option to set my door to the Open state, but the transform, in which I think all of the details are done correctly (including all of the actions etc),  doesn't do anything. Physics is set to static (is this correct now?).

I thought maybe this might relate to #3 as well so I'm posting it in case.
Logged

HE-ZACH

  • HeroEngine
  • *****
  • Posts: 2
    • View Profile
Re: Area states system issues
« Reply #11 on: Jan 28, 13, 02:23:59 PM »

After investigation of the issues listed I found the following:

1. The reason he was getting the error that the _statesClassMethods:RemoteRequestLinkStateToSeletedNode was because the remote call member variable toFunction was being set to 'RemoteRequestLinkStateToSeletedNode' instead of 'RemoteRequestLinkStateToSelectedNode'

2: As listed by one of the users the check to see if the timeinterval was valid in a _GUINodePropertyEditorCellTextInputBox:_updateNodeFieldWithCellValue was incorrect. The logic was correct however the closing '.' for one of the if checks was missing producing false negatives when attempting to edit the cell.

3: The reason the script error was being thrown was because it was using a member variable (_statefulObjectActionStateName) to find the name of the Stateful object instead of the value of the statename passed in by the tokens parameter under the id #statename. (should be name as string = tokens[#statename])

All of these issues have been addressed. They are very simple changes so if they impeding your workflow feel free to make the changes before the next update gets released.
Logged

uexilon

  • General Accounts
  • *
  • Posts: 62
    • View Profile
Re: [Fixed in Upcoming Package] Area states system issues
« Reply #12 on: Apr 11, 13, 07:19:01 AM »

I Just got another problem with the state system.

I checked the script and saw that the Problem with the RemoteRequestLinkStateToSele(c)tedNode already has been fixed?!
I can't use the States right click menu. When I click on edit state or set state nothing happens. I get NO error message. Changing the state with AreaStateEditor works.
Logged