HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 ... 4 5 [6] 7 8

Author Topic: How to make a simple scrollable chat window  (Read 50130 times)

Zasdman

  • General Accounts
  • *
  • Posts: 5
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #75 on: Apr 14, 12, 12:18:15 AM »

Thank you for this! I followed it all ( Typed it all ) I made some mistakes and found them and fixed them. learned more than you would just copying and pasting for sure.

Keep them coming :)
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #76 on: Apr 18, 12, 11:01:01 PM »

I was giving this one a whirl, but get this error when I hit the slash.

Code: [Select]
22:50:41: !ERROR!HeroScript::HeroMachine::ScriptError:GOM::getVariableReferenceFromNode (10757): requested node ID (0) not found
22:50:41: !ERROR!System:SCRIPT ERROR: GOM::getVariableReferenceFromNode (10757): requested node ID (0) not found
04/18/2012 22:50:40
Call trace:
  Script TMP_ChatWindowClassMethods line 44 me[id=1000000259 class=TMP_ChatWindow]
  Script E_ChatHandlerClassMethods line 9 me[id=1000000180 class=_ChatHandler,E_ChatHandler]
  Script Input_Command line 32 me[9223372056103171524]
starting method/function ONCMDSTOP
starting me[id=9223372056103171524 class=E_playerAccount,HBNode,CharacterNode,_ACCControllerOwner]

Chat window shows up, even has Invalid Target messages if I try a combat art without a target.  Just hitting Enter or / does nothing but toss that error, and I also can't click inside the text box to enter chat mode.

Just trying to see what I skipped or missed or typo'd.  Thanks for any help, as well as a big thanks for taking the time to do this.  A nice step in the right direction.
Logged

XCalPro

  • General Accounts
  • *
  • Posts: 105
  • 3D Artist & HSL Coder
    • View Profile
    • Excalibur Productions
Re: How to make a simple scrollable chat window
« Reply #77 on: Apr 19, 12, 07:25:19 AM »

There is a wiki version of this tutorial http://hewiki.heroengine.com/wiki/Scrollable_Chat_Window which maybe easier to follow.
Logged
Tony Oliveira aka XCalPro
HeroEngine Projects: Traveller 6 Online - www.traveller6.com/forum/
Portfolio: www.xcalpro.com/art

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #78 on: Apr 19, 12, 08:57:40 AM »

Rock on, I'll try that later today and re-trace my steps.  Thanks.
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #79 on: Apr 19, 12, 12:40:16 PM »

I found out my doofus move of adding chatwindow instead of chatinputbox to the TEMP_ChatWindow gui ;)

Couple clicks and good to go.
Logged

DA_Joey

  • General Accounts
  • *
  • Posts: 1
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #80 on: May 18, 12, 01:08:26 AM »

Is it possible for us to get a written list of the properties on the chat box controls as the links to the pics are broken now?
Logged

Redfreak

  • World Owners
  • ****
  • Posts: 2
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #81 on: May 27, 12, 12:45:38 AM »

So I followed the tutorial and double checked my script a couple times but I still get this error.

Code: [Select]
22:34:06: !ERROR!HeroScript::HeroMachine::ScriptError:Node 0 not found to call method ADDCHATMESSAGE
22:34:06: !ERROR!System:SCRIPT ERROR: Node 0 not found to call method ADDCHATMESSAGE
05/26/2012 22:34:11
Call trace:
  Script E_ChatHandlerClassMethods line 5 me[1000000179]
  Script _ChatHandlerClassMethods line 4 me[1000000179]
starting method/function _GOTCHATMESSAGE
starting me[id=1000000179 class=_ChatHandler,E_ChatHandler]

Seems like there is an error with this line

Code: [Select]
me.GetChatWindow().AddChatMessage( chatMessage, channelName )
and here is my GetChatWindow function

Code: [Select]
method GetChatWindow() as NodeRef of Class TMP_ChatWindow
  println("Getting Chat Window")
  return FindGUIControlByName(None, "game.TEMP_ChatWindow")
.
Logged

Jrome90

  • General Accounts
  • *
  • Posts: 330
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #82 on: May 28, 12, 07:48:22 PM »

So I followed the tutorial and double checked my script a couple times but I still get this error.

Code: [Select]
22:34:06: !ERROR!HeroScript::HeroMachine::ScriptError:Node 0 not found to call method ADDCHATMESSAGE
22:34:06: !ERROR!System:SCRIPT ERROR: Node 0 not found to call method ADDCHATMESSAGE
05/26/2012 22:34:11
Call trace:
  Script E_ChatHandlerClassMethods line 5 me[1000000179]
  Script _ChatHandlerClassMethods line 4 me[1000000179]
starting method/function _GOTCHATMESSAGE
starting me[id=1000000179 class=_ChatHandler,E_ChatHandler]

Seems like there is an error with this line

Code: [Select]
me.GetChatWindow().AddChatMessage( chatMessage, channelName )
and here is my GetChatWindow function

Code: [Select]
method GetChatWindow() as NodeRef of Class TMP_ChatWindow
  println("Getting Chat Window")
  return FindGUIControlByName(None, "game.TEMP_ChatWindow")
.

Is your chat window GUI control set to be on the "Game" layer?
Logged

Alderdale

  • World Owners
  • ****
  • Posts: 12
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #83 on: May 29, 12, 11:13:00 PM »

Cruising through this tutorial, when recompiling the E_ChatHandlerClassMethods script (yes I backed up the original code) I get this compile error:

~snipe~
 8               method OpenChatInput(command as Boolean)
 9                    me.GetChatWindow().SetChatFocus(command)
~snipe~

~compile error~
Ln 9 col 25 Method 'SetChatfocus' not found

Which is not suprising as when I was typing that line there was no .SetChatFocus popping up in intellisense.

Any suggestions?
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #84 on: May 30, 12, 09:35:51 AM »

Did you compile & submit the TMP_ChatWindowClassMethods script?  Unsure if that's the problem, but the setfocus method is defined there so if not submitted, it won't know.  If you have, could also just simply restart the client and see if that fixes it.
Logged

Alderdale

  • World Owners
  • ****
  • Posts: 12
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #85 on: May 30, 12, 10:03:10 PM »

Did you compile & submit the TMP_ChatWindowClassMethods script?  Unsure if that's the problem, but the setfocus method is defined there so if not submitted, it won't know.  If you have, could also just simply restart the client and see if that fixes it.

Your right I have some corrections to make in my ChatWindowClassMethods script.
Logged

piluve

  • Developer
  • *
  • Posts: 25
  • Spain Development
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #86 on: Sep 21, 12, 04:01:43 PM »

Hello!

I have a problem...

When i make my GUIXML script and I try to submit it to the server it reports me these fail:


Code: [Select]
SUBMIT of temp_chatwindow.xml FAILED! need merge
What will be the problem=??

Her is my xml code:


Code: [Select]
<createControlType inheritFrom='_window' class='TMP_ChatWindow' type='TEMP_ChatWindow' description='Chat SoR (nacho)' treePath='CleanEngine' name="TEMP_ChatWindow" allowTitlebar="false" allowCloseButton="false">
  <position x="5" y="475"/>
  <size x="350" y="150"/>
  <minimumSize y="150"/>
  <maximumSize x="500" y="150"/>
  <set name="TEMP_ChatWindow.scrollable">
    <size x="342" y="114"/>
    <set name='TEMP_ChatWindow.scrollable' attribute='dockMode' value="TOP"/>
  </set>
  <set name="TEMP_ChatWindow.scrollable.clientarea">
    <size x="327" y="114"/>
    <set name='TEMP_ChatWindow.scrollable.clientarea' attribute='dockMode' value="TOP"/>
  </set>
  <E_ChatInputBox name="E_ChatInputBox" dockMode="BOTTOM"/>
</createControlType>
Logged

Chromehound

  • General Accounts
  • *
  • Posts: 151
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #87 on: Sep 24, 12, 09:43:21 AM »

Sounds like you might have deleted a script and tried doing it over with the same name.  Files don't technically get deleted fully so you'll have to use the Show Deleted checkbox to open the deleted file, and put your new code in there after un-deleting & re-submitting.

Could also use p4merge if you don't already - http://www.perforce.com/downloads/complete_list
Logged

OurLord

  • World Owners
  • ****
  • Posts: 68
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #88 on: Oct 30, 12, 09:24:03 AM »

Hello thank you for you tutorial, I am very new to this so bare with me.

The section in your instructions Create a New GUI Prototype is confusing me. How do I get the "Create New" prototype input box?

It is not under the DOM editor or Organizer Panel or any of the Windows I can add to the Organizer panel or the F5 Gui Panel?

I'm sure this is just me being stupid, Please point me at the right tool.

I have tried to use the CPFC CLI command to create the prototype, there is no option to inherit from? Is this just adding a class using the CLI MPAC command?

I get the following error when attempting to add the _window class to my prototype:-

15:38:06: |MPAC RAL_GUIChatWindowPrototype, _window;
15:38:06: MPAC ERROR 0 : "Error calling lookupClassDefID"

I have noticed the "create new" option at the bottom of the organizer panel, but this is not available for client prototypes?


Thanks
« Last Edit: Oct 30, 12, 11:16:17 AM by OurLord »
Logged

OurLord

  • World Owners
  • ****
  • Posts: 68
    • View Profile
Re: How to make a simple scrollable chat window
« Reply #89 on: Oct 30, 12, 11:19:14 AM »

Sorry my bad. I have found the correct label to click.

For anyone else as lost as me. You access the create new GUI prototype from the Organizer panel, Tab GUIXML, Create New option at the bottom of the Organizer panel. I had not even noticed these labels.

Thanks.
Logged
Pages: 1 ... 4 5 [6] 7 8