I'm just trying to build up a little dialog, but I get an error when I invoke it.
I start it with
dialogs.startDialog( player, "foo" );
The dialog file is located at ./dialogs/foo.dlg.groovy
I run the game as server.
The errormessage:
(com.jme3.network.HostedConnection,mythruna.net.msg.ConsoleMessage)
at mythruna.server.AbstractMessageDelegator.messageReceived(AbstractMessageDelegator.java:195)
at com.jme3.network.base.MessageListenerRegistry.messageReceived(MessageListenerRegistry.java:74)
at com.jme3.network.base.DefaultServer.dispatch(DefaultServer.java:284)
at com.jme3.network.base.DefaultServer$Redispatch.messageReceived(DefaultServer.java:565)
at com.jme3.network.base.DefaultServer$Redispatch.messageReceived(DefaultServer.java:561)
at com.jme3.network.base.KernelAdapter.dispatch(KernelAdapter.java:179)
at com.jme3.network.base.KernelAdapter.createAndDispatch(KernelAdapter.java:233)
at com.jme3.network.base.KernelAdapter.run(KernelAdapter.java:276)
Caused by: java.lang.RuntimeException: File not found for:foo.dlg.groovy
at mythruna.script.DialogManager.readScript(DialogManager.java:110)
at mythruna.script.DialogManager.startDialog(DialogManager.java:148)
at mythruna.script.DialogManager$startDialog.call(Unknown Source)
at Script8$_run_closure4_closure7.doCall(Script8.groovy:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:885)
at groovy.lang.Closure.call(Closure.java:405)
at groovy.lang.Closure.call(Closure.java:418)
at mythruna.script.ShellScript.execute(ShellScript.java:38)
at org.progeeks.tool.console.ShellCommandProcessor.execute(ShellCommandProcessor.java:86)
at org.progeeks.tool.console.Shell.executeCommand(Shell.java:251)
at org.progeeks.tool.console.Shell.execute(Shell.java:232)
at mythruna.server.GameServer$LoggedInMessageHandler.console(GameServer.java:933)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at mythruna.server.AbstractMessageDelegator.messageReceived(AbstractMessageDelegator.java:187)
... 7 more
Do you know what's the problem, paul?
I already tried putting the dialog-file to the main or the scripts directory, but it doesn't work...
Weird. That should work.
So from where you launch the server you have:
./scripts
./dialog
Directories?
I will double check that this works for me... but really my server is already doing this with the help text to override the built in help. So it should work. Very strange.
Now it works.
The problem was that I thought that the directory should be ./dialogS.
Thanks for the fast help!
Now it works.
The problem was that I thought that the directory should be ./dialogS.
Thanks for the fast help!
Hmmm... I guess it probably _should_ be. :) Oh well, easy enough for me to add another search path, I guess. :)