[英]Lua - unexpected symbol
我的代碼給出了“script.lua:25: unexpected symbol”。 我正在嘗試使用 lua 為 PSP 制作一個應用程序,但它給出了錯誤。
我的代碼有什么問題?
usb.on()
green = color.new(0, 255, 0)
blue = color.new(0, 0, 255)
white = color.new(255, 255, 255)
screen.print(200, 100, "Hello World!" .. tostring(os.clock()), green)
screen.flip()
while true do
index = 0
screen.print(0, 10, tostring(batt.percent()) .. "%", white)
for i in pairs(files.listfiles("/")) do
screen.print(0, index * 10, i, white)
index = index + 1
end
for i = 0, 20 do
x0 = i / 20 * 479
y1 = 271 - i / 20 * 271
draw.line(x0, 271, 479, y1, blue)
end
screen.flip()
end
我解決了。 代碼本身沒有錯誤。 我通過重新啟動解釋器來修復它
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.