Lua脚本中的星号错误,自动播放媒体工作室8,可以解决?

问题描述 投票:0回答:1

这是lua脚本的问题,当我开始编译时,错误会跳至代码0x785,我的自动播放版本为1.69

QTCore和Windows 7 Ultimate,处理器XEON X-1 plthron,26GB Ram,10TB硬盘驱动器,以及我的失败脚本源:

require("INC_Class.lua")

--===========================

cAnimal=setclass("Animal")

function cAnimal.methods:init(action, cutename) 
    self.superaction = action
    self.supercutename = cutename
end

--==========================

cTiger=setclass("Tiger", cAnimal)

function cTiger.methods:init(cutename) 
    self:init_super("HUNT (Tiger)", "Zoo Animal (Tiger)")
    self.action = "ROAR FOR ME!!"
    self.cutename = cutename
end

--==========================

Tiger1 = cAnimal:new("HUNT", "Zoo Animal")
Tiger2 = cTiger:new("Mr Grumpy")
Tiger3 = cTiger:new("Mr Hungry")

print("CLASSNAME FOR TIGER1 = ", Tiger1:classname())   
print("CLASSNAME FOR TIGER2 = ", Tiger2:classname()) 
print("CLASSNAME FOR TIGER3 = ", Tiger3:classname()) 
print("===============")
print("SUPER ACTION",Tiger1.superaction)
print("SUPER CUTENAME",Tiger1.supercutename)
print("ACTION        ",Tiger1.action)
print("CUTENAME",Tiger1.cutename)
print("===============")
print("SUPER ACTION",Tiger2.superaction)
print("SUPER CUTENAME",Tiger2.supercutename)
print("ACTION        ",Tiger2.action)
print("CUTENAME",Tiger2.cutename)
print("===============")
print("SUPER ACTION",Tiger3.superaction)
print("SUPER CUTENAME",Tiger3.supercutename)
print("ACTION        ",Tiger3.action)
print("CUTENAME",Tiger3.cutename)
lua
1个回答
0
投票

解决方案非常简单,lua中的星号表示“您忘记使用通配符部分默认情况下导入所有必要的模块”,要解决此问题,请更改此:]

require("INC_Class.lua")

对此:

require(*.lua);
© www.soinside.com 2019 - 2024. All rights reserved.