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

Author Topic: [Resolved] mnac with server DOM class and server script  (Read 1466 times)

Caverrance

  • General Accounts
  • *
  • Posts: 5
    • View Profile

Hello all,

I'm still in the beginning stages of learning HSL, so bear with me. I'm trying to create a basic server trigger using class methods to spawn an NPC. I created a server-side DOM class (data archetype) called OmiTrigger, and a a server-side script called OmiTriggerClassMethods. I placed a trigger in a clean test area, and tried to mnac the GUID to OmiTrigger.

I'm getting the MNAC error 0 as detailed in the wiki here: http://hewiki.heroengine.com/wiki/Error:_MNAC_ERROR_0

I've made certain that I'm spelling the DOM class name correctly, and I've tried purging my LRC files as suggested. Is there something else I could be missing?

I've been able to mnac a client DOM class to an object as detailed in the HSL tutorial with no issue.

Thanks in advance!
Rance
« Last Edit: Nov 02, 12, 09:20:13 PM by HE-Cooper »
Logged

HE-CHRISTOPHER

  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: mnac with server DOM class and server script
« Reply #1 on: Nov 17, 11, 09:50:51 AM »


Are you sure your class exists in the server DOM?

Code: [Select]
\scd <class name>
Are you using the "\" CLI prefix with MNAC so that you are talking to the server GOM?

Code: [Select]
\mnac <node id>;<class name>
http://hewiki.heroengine.com/wiki/CLI#CLI_prefixes

Christopher
Logged
Christopher Larsen
CTO
HeroEngine

Caverrance

  • General Accounts
  • *
  • Posts: 5
    • View Profile
Re: mnac with server DOM class and server script
« Reply #2 on: Nov 17, 11, 10:08:13 AM »

Hi Christopher,

Thanks! That seems to be exactly the problem. The article you linked is very helpful. I was trying to use /mnac which I now see is the client side. I'll try this when I get home tonight.

-Rance
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: mnac with server DOM class and server script
« Reply #3 on: Nov 17, 11, 10:45:18 AM »

To be thorough, for using on the client side, the prefix should be | rather than /, else the change would be temporary and not propagated to others (unless you intended it to be temporary).  At least I think that applies to this case.

And I updated the wiki to mention that prefix.
« Last Edit: Nov 17, 11, 10:54:51 AM by ScottZarnke »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Caverrance

  • General Accounts
  • *
  • Posts: 5
    • View Profile
Re: mnac with server DOM class and server script
« Reply #4 on: Nov 17, 11, 10:59:21 AM »

Yeah, I think I'm going to need to read up on the CLI a bit more to understand it better. Thanks for the Tip! I'm really impressed with the community here.
Logged

HE-CHRISTOPHER

  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: mnac with server DOM class and server script
« Reply #5 on: Nov 17, 11, 11:39:28 AM »

Quote
To be thorough, for using on the client side, the prefix should be | rather than /, else the change would be temporary and not propagated to others (unless you intended it to be temporary).  At least I think that applies to this case.

The "|" communicates with the Client (persistent) DOM on the Server, it is this DOM that is communicated to the client during login so that it has the definitions it needs in order to run.  There are no nodes in the Client DOM on the Server so "|mnac" is not applicable, though other commands such as creating definitions "|ccd" would be valid.

The client also has a local (non-persistent) GOM/DOM that "/" prefaced CLI commands communicate, anything created or modified using "/" exists only during the current session and will disappear when the application is closed.
Logged
Christopher Larsen
CTO
HeroEngine

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: mnac with server DOM class and server script
« Reply #6 on: Nov 17, 11, 02:16:36 PM »

OK, thanks.  I forget sometimes when | needs to be used.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

Caverrance

  • General Accounts
  • *
  • Posts: 5
    • View Profile
Re: mnac with server DOM class and server script
« Reply #7 on: Nov 17, 11, 07:46:07 PM »

Yep, that worked. I just wanted to confirm that this was indeed my issue.

Thanks again for the help.

Rance
Logged