luaminecraftcomputercraft

What does window:94:arguments must be the same length stand for?


I'm trying to figure out what im doing wrong, but this is the only thing i got as error. Can you give me some tips what i can look for?

The error happens when Deutsch is selected, it works fine when Englisch is selected.

--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 tells me window:94:arguments must be the same length.


Solution

  • ComputerCraft for Minecraft 1.7.10 has a bug where it mishandles the length of non-ASCII Unicode characters, so it chokes on the ä in gewählt. It's fixed in ComputerCraft for Minecraft 1.12.2. I tried to find a workaround by using blit instead of write, but I was unsuccessful.