New line characters causing issues?

  • I'm using a text command to write to the page, and on any string that uses \n (newline character) I'm getting this error.

    Can anyone help me decipher this? I have had no problem getting newline characters to work on past projects.

    Traceback (most recent call last):
      File "", line 680, in <module>
      File "", line 573, in draw_shop_page
      File "drawBot/drawBotDrawingTools.pyc", line 1607, in text
      File "drawBot/context/baseContext.pyc", line 908, in makeTextBoxes
    IndexError: NSRangeException - NSMutableRLEArray objectAtIndex:effectiveRange:: Out of bounds

  • This is the text command:

    drawBot.text("Starting\n \n      HP\n\n \n       ¢",(25,145))

  • Testing that line in drawbot, it works. It seems your doing it with imported drawbot. Wonder if it might work with textBox rather than text?

  • admin

    could you make an example script throwing this traceback?

    is your drawbot up to date? (the module)

Log in to reply