【问题标题】:What does window:94:arguments must be the same length stand for?window:94:arguments must be the same length 代表什么?
【发布时间】: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


【解决方案1】:

ComputerCraft for Minecraft 1.7.10 有一个错误,它错误地处理了非 ASCII Unicode 字符的长度,因此它阻塞了 gewählt 中的 ä。它已在 ComputerCraft for Minecraft 1.12.2 中修复。我试图通过使用blit 而不是write 来找到解决方法,但没有成功。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-04-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-28
    • 2020-01-20
    • 1970-01-01
    相关资源
    最近更新 更多