出现了新问题,把旧版的wisteriamusic.lua删掉,然后放进去新的ver2文件再重命名成wisteriamusic,反而出现调用getmusic函数失败了……之前旧版反而没这个问题 Orz
错误代码长这样:
调用/storage/emulated/0/Android/data/io.github.mzdluo123.mirai.android/files/Dice771541991/plugin/wisteriamusic.lua函数getMusic失败!
…rai.android/files/Dice771541991/plugin/wisteriamusic.lua:39: attempt to index a nil value (field ‘result’)

    5 天 后

    无法调用,是第一次使用,也替换了json.lua,别的脚本正常,这个不行,错误代码:
    调用F:\Mirai Dice\Dicexxxxxxx\plugin\WisteriaMusic_Ver02.lua函数getMusic失败!
    …Mirai Dice\Dicexxxxxxx\plugin\WisteriaMusic_Ver02.lua:34: module ‘json’ not found:

      这边也是第一次加文件之后出现的错误orzzzz错误代码是↓

      调用/root/server/server_core/miluo/Dice2954758344/plugin/WisteriaMusic_Ver02.lua函数getMusic失败!
      …core/miluo/Dice2954758344/plugin/WisteriaMusic_Ver02.lua:38: attempt to index a nil value (field ‘result’)

        yikecan 嗯……这个看上去就是json的问题,我也不知道……或许你可以试试更新?

        4 天 后

        Qwekkx 不好意思这么久才回复!用的是最新的的windows版本,在重新启动几次之后不知道为什么就好了……还是很感谢www

        版本2.6.3(beta3)603在使用新版本后出现以下错误C:\bot2\DICE162\plugin\WISTER3.LUA函数getMusic失败!
        C:\bot2\DICE162\plugin\WISTER3.LUA:38: attempt to index a nil value (field ‘result’)
        服务器系统是window 2016
        请问一下大佬出现这个报错该怎么解决?

          麻了 2.6.3 beta5 2022-02-19
          17:54:27 I/MiraiNative: [DiceDriver DiceDriver] 调用C:\Users\12271\Desktop\1\DICE121\plugin\WISTER1.LUA函数getMusic失败!
          C:\Users\12271\Desktop\1\DICE121\plugin\WISTER1.LUA:38: attempt to index a nil value (field ‘result’)
          调试了半天也没用

            Tuanzhang 如果mirai上可以发出去,函数没有报错,实际上没有,那就是被屏蔽了。刚搬到服务器确实容易被屏蔽

            13 天 后
            7 天 后

            \DICEDR1\DICE721\plugin\WISTER1.LUA函数getMusic失败!
            …s\ADMINI1\Desktop\DICEDR1\DICE721\plugin\WISTER1.LUA:38: attempt to index a nil value (field ‘result’)
            QAQ,这是

              眠眠 沉重地摇头.jpg 我也不知道,说不定是编码的问题,你把这个lua文件用记事本方式打开,另存为utf-8格式试试?

                4 天 后

                Qwekkx 函数失败可能是api的问题,我大致测试了一下:
                res,data = http.get(polar)--访问api获取点歌所得信息
                这一句的输出有问题,直接return data的话显示需要登陆,返回的内容是:
                {"code":-462,"data":{"actionCode":"1056401","verifyType":50,"verifyId":1008601,"verifyUrl":"","blockText":"绑定手机后,可进行下一步操作哦~","verifyToken":null,"btnText":"","orpheusUrl":"","frontRuleIds":[1056401],"params":{"event_id":"00211355389350006786","sign":"d704572d71b223f376c4371f7afd8210"},"url":null},"message":"请绑定手机后再试哦~"}

                在同站的分享 指令脚本哔哩哔哩视频获取器 中,
                在同样的位置测试输出data,
                res,data = http.get(url)
                可以得到想要的结果