【发布时间】:2023-03-26 22:00:01
【问题描述】:
我试图弄清楚我做错了什么,但这是我唯一得到的错误。你能给我一些提示吗?
选择Deutsch时出现错误,选择Englisch时正常。
--Size 51,18
--Zeit: 75
w, h = term.getSize()
--OS.Start
function Haupt(Inhalt)
paintutils.drawFilledBox(1, 1, w, h, colors.blue)
paintutils.drawLine(1, 1, 6, 1, colors.white)
term.setTextColor(colors.gray)
term.setCursorPos(1,1)
term.write("MineOS")
paintutils.drawLine(1, 3, string.len(Inhalt), 3, colors.white)
term.setTextColor(colors.black)
term.setCursorPos(1, 3)
term.write(Inhalt)
term.setCursorPos(1, 1) --ACHTUNG POS ÄNDERN
end
while true do
local event, key = os.pullEvent( "key" )
if key == keys.b then
Deutsch = 0
Englisch = 1
break
elseif key == keys.c then
Deutsch = 1
Englisch = 0
break
end
end
if Englisch == 1 then
Haupt("You've chosen English. The system will start after the Tutorial.")
elseif Deutsch == 1 then
Haupt("Du hast Deutsch gewählt. Das System wird nachdem Tutorial starten.")
end
ComputerCraft 告诉我window:94:arguments must be the same length。
【问题讨论】:
-
没有行号?或您已将错误范围缩小到的任何代码?如果没有此上下文,可能很难确定错误的原因。
-
您是否有更多信息,例如可以添加到问题中的完整错误消息?这也可能会指出您无法正常工作的代码的特定部分
-
你能最小化你的例子吗? (即,在不解决问题的情况下尽可能多地删除代码)
-
您是否尝试过从 Deutsch 字符串中删除
ä?只是一个随机的想法,它可能由于某种原因无法显示该字符。 -
@ReySKR 我想我有一个可以保留它的解决方法。让我测试一下,然后我会把它作为答案发布。
标签: lua minecraft computercraft