"string indices must be integers, not tuple" [solved]
Posted: Wed Jan 15, 2014 9:12 am
I'm trying to figure out how to customize the in-game messaging system I retrieved from this thread and I came up with an error I'm unsure how to fix.
This is where the error occured, and this is the traceback:
Code: Select all
use mailbox_commands
screen mailbox_commands:
hbox:
if current_message and current_message.can_reply:
imagebutton idle "reply_ground.png" hover "reply_hover.png" action current_message.reply
else:
imagebutton idle "reply_ground.png" hover "reply_hover.png" action None
if current_message:
imagebutton idle "delete_ground.png" hover "delete_hover.png" action [current_message.delete, SetScreenVariable("current_message", None)]
else:
imagebutton idle "delete_ground.png" hover "delete_hover.png" action None
if new_messages > 0:
imagebutton idle "mark_ground.png" hover "mark_hover.png" [mark_all_read, SetVariable("new_messages",0)]
else:
imagebutton idle "mark_ground.png" hover "mark_hover.png" action None
imagebutton idle "restore_ground.png" hover "restore_hover.png" action restore_all
imagebutton idle "exit_ground.png" hover "exit_hover.png" action Hide("mailbox")Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 21, in script
File "game/messages.rpy", line 94, in python
File "game/messages.rpy", line 107, in python
TypeError: string indices must be integers, not tuple