查看: 4085|回复: 2

[待解决] 想请问这脚本错在哪

  • TA的每日心情
    开心
    2020-8-14 23:25
  • 签到天数: 1 天

    [LV.1]初来乍到

    新人上路

    枫币
    39
    威望
    0
    贡献
    1
    在线时间
    5 小时
    注册时间
    2020-8-12
    发表于 2020-8-15 22:21:33 | 显示全部楼层 |阅读模式
    2020-08-15 22:20:25.715 [nioEventLoopGroup-5-1] ERROR scripting.npc.NPCScriptManager.action(NPCScriptManager.java:89) - 执行NPC脚本出错 NPC ID : 1530635 模式: null.
    错误信息:
    javax.script.ScriptException: TypeError: cm.addPopupSay is not a function in <eval> at line number 30
            at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467) ~[nashorn.jar:?]
            at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:389) ~[nashorn.jar:?]
            at jdk.nashorn.api.scripting.NashornScriptEngine.invokeFunction(NashornScriptEngine.java:190) ~[nashorn.jar:?]
            at scripting.npc.NPCScriptManager.action(NPCScriptManager.java:84) [Server.jar:?]
            at handling.channel.handler.NPCHandler.NPCMoreTalk(NPCHandler.java:507) [Server.jar:?]
            at handling.MapleServerHandler.handlePacket(MapleServerHandler.java:543) [Server.jar:?]
            at handling.MapleServerHandler.channelRead(MapleServerHandler.java:1184) [Server.jar:?]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:351) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:373) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:359) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:129) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:651) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:574) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:488) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:450) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:873) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [netty-all-4.1.6.Final.jar:4.1.6.Final]
            at java.lang.Thread.run(Thread.java:745) [?:?]
    Caused by: jdk.nashorn.internal.runtime.ECMAException: TypeError: cm.addPopupSay is not a function
            at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:102) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98) ~[nashorn.jar:?]
            at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176) ~[nashorn.jar:?]
            at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124) ~[nashorn.jar:?]
            at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154) ~[nashorn.jar:?]
            at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253) ~[nashorn.jar:?]
            at jdk.nashorn.internal.scripts.Script$Recompilation$187$142AAA$\^eval\_.action(<eval>:30) ~[?:?]
            at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:643) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) ~[nashorn.jar:?]
            at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ~[nashorn.jar:?]
            at jdk.nashorn.api.scripting.ScriptObjectMirror.callMember(ScriptObjectMirror.java:199) ~[nashorn.jar:?]
            at jdk.nashorn.api.scripting.NashornScriptEngine.invokeImpl(NashornScriptEngine.java:383) ~[nashorn.jar:?]
            ... 29 more
  • TA的每日心情
    无聊
    2023-12-29 18:08
  • 签到天数: 83 天

    [LV.6]常住居民II

    版主

    枫币
    4486
    威望
    8
    贡献
    63
    在线时间
    584 小时
    注册时间
    2019-3-1
    发表于 2020-8-16 17:15:22 | 显示全部楼层
    addPopupSay函數不存在

    该用户从未签到

    新人上路

    枫币
    83
    威望
    0
    贡献
    0
    在线时间
    12 小时
    注册时间
    2020-11-30
    QQ
    发表于 2020-12-1 18:11:27 | 显示全部楼层
    服务端沒有 cm.addPopupSay 这个函数
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    枫叶物语即使倒闭也绝对不会变质
    Copyright © 2001-2013 Discuz Team. Powered by Discuz! X3.5 |网站地图 | 本站已运行: