我试图按照Lua类的语言学习语言,并在尝试运行程序以查看标题时出现错误的第17行
lua: [string "<eval>"]:1: attempt to index global 'application' (a nil value)
stack traceback:
[string "<eval>"]:1: in main chunk
这是我编写的所有代码以及课程的链接
application:setOrientation(Application.LANDSCAPE_LEFT
application:setScaleMode("letterbox")
BLACK @ 0x1A1A1A
application:setBackgroundColor(BLACK)
local fg = Bitmap.new(Texture.new("images/foreground.png", true))
fg:setX(1201)
stage:addChild(fg)
YELLOW @ 0xDAD45E
local title = TextField.new(nil, "The Long Dark")
title:setTextColor(YELLOW)
title:setPosition(1320, 100)
stage:addChild(title)
https://programmingbymoonlight.com/roguelike-part-1-lua-and-gideros-an-introduction/
因此,我尝试了gideros并使其正常工作,尽管它取决于lua,但它具有自己的IDE框架本身的命令。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句