查看: 2748|回复: 12
打印 上一主题 下一主题

[交流] 【教程】Mod SDK库使用说明

[复制链接]

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
楼主
发表于 2019-10-9 14:21:25 | 显示全部楼层 IP:江苏
在ide导入这个包后,无法过开发者后台机审,麻烦把这个加下白名单

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
沙发
发表于 2019-10-12 10:45:51 | 显示全部楼层 IP:江苏
雾都漫游者 发表于 2019-10-10 20:31
你这个组件ID是多少,我们验证一下

4632071407474619211

组件ID,用于测试用的。

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
板凳
发表于 2019-10-12 10:46:17 | 显示全部楼层 IP:江苏
给的提示是引用一个空的函数的返回值

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
地板
发表于 2019-10-12 16:55:49 | 显示全部楼层 IP:江苏
Minehero-境界 发表于 2019-10-12 10:54
是不是函数没有返回任何东西然后赋值给另一个变量了

是的

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
地下室
发表于 2019-10-21 10:36:36 | 显示全部楼层 IP:江苏
组件ID:4632511119295203360, 失败原因: [ { "code_check": [ { "message": "method already defined line 196", "obj": "ModServerSystem.setEntityHealth", "column": 4, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modServer/serverSystem.py", "line": 412, "message-id": "E0102", "type": "error", "symbol": "function-redefined", "module": "aviationScripts.modServer.serverSystem" } ], "module_check": null, "api_check": null, "file": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modServer/serverSystem.py" }, { "code_check": [ { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 49, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 33, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" }, { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 74, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 33, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" }, { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 49, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 34, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" }, { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 74, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 34, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" }, { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 49, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 35, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" }, { "message": "Module 'aviationScripts.modClient.data.ClientData' has no 'ButtonPos' member; maybe 'ButtonPos7'?", "obj": "AviationUIScreen.Init", "column": 74, "path": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py", "line": 35, "message-id": "E1101", "type": "error", "symbol": "no-member", "module": "aviationScripts.modClient.ui.aviation" } ], "module_check": null, "api_check": null, "file": "/tmp/PackScripts/item_4632511119295203360_4_v4_80wfxp7a/behavior_Pack/aviationScripts/modClient/ui/aviation.py" } ]

12

主题

61

回帖

52

积分

Lv.3 矿物能手

UID
6514283
小麦
0
金锭
298
下界之星
0
6
发表于 2019-10-23 16:14:20 | 显示全部楼层 IP:江苏
雾都漫游者 发表于 2019-10-10 20:31
你这个组件ID是多少,我们验证一下

组件ID:4634814314477920847(RedstoneArmor)

以第一段报错为例:

  1. {
  2.   "code_check": [
  3.     {
  4.       "message": "Assigning to function call which doesn't return",
  5.       "obj": "",
  6.       "column": 0,
  7.       "path": "/tmp/PackScripts/item_4634814314477920847_1_v1_ck0n1o3h/behavior_Packs/redstoneArmorScripts/modServer/__init__.py",
  8.       "line": 6,
  9.       "message-id": "E1111",
  10.       "type": "error",
  11.       "symbol": "assignment-from-no-return",
  12.       "module": "redstoneArmorScripts.modServer"
  13.     },
  14.     {
  15.       "message": "Assigning to function call which doesn't return",
  16.       "obj": "",
  17.       "column": 0,
  18.       "path": "/tmp/PackScripts/item_4634814314477920847_1_v1_ck0n1o3h/behavior_Packs/redstoneArmorScripts/modServer/__init__.py",
  19.       "line": 7,
  20.       "message-id": "E1111",
  21.       "type": "error",
  22.       "symbol": "assignment-from-no-return",
  23.       "module": "redstoneArmorScripts.modServer"
  24.     },
  25.     {
  26.       "message": "Assigning to function call which doesn't return",
  27.       "obj": "",
  28.       "column": 0,
  29.       "path": "/tmp/PackScripts/item_4634814314477920847_1_v1_ck0n1o3h/behavior_Packs/redstoneArmorScripts/modServer/__init__.py",
  30.       "line": 8,
  31.       "message-id": "E1111",
  32.       "type": "error",
  33.       "symbol": "assignment-from-no-return",
  34.       "module": "redstoneArmorScripts.modServer"
  35.     }
  36.   ],
  37.   "module_check": null,
  38.   "api_check": null,
  39.   "file": "/tmp/PackScripts/item_4634814314477920847_1_v1_ck0n1o3h/behavior_Packs/redstoneArmorScripts/modServer/__init__.py"
  40. }
复制代码


behavior_Packs/redstoneArmorScripts/modServer/__init__.py 的前八行分别是:

  1. # -*- coding: utf-8 -*-

  2. import mod.server.extraServerApi as serverApi
  3. from redstoneArmorScripts.modCommon import *

  4. ServerSystem = serverApi.GetServerSystemCls()
  5. SystemName = serverApi.GetEngineSystemName()
  6. Namespace = serverApi.GetEngineNamespace()
复制代码


GetServerSystemCls,GetEngineSystemName,和 GetEngineNamespace 均为官方 SDK 文档中提到的的内容,根本不应存在函数没有返回任何东西然后赋值给另一个变量,也就是 assignment-from-no-return 这样的问题。
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

返回顶部