diff options
| author | 1029chris <1029chris@gmail.com> | 2016-04-14 14:40:02 -0700 |
|---|---|---|
| committer | 1029chris <1029chris@gmail.com> | 2016-04-14 14:40:02 -0700 |
| commit | 6d54f2c8edbef92f04c55a7a281eb4f2713098c6 (patch) | |
| tree | 6cea8a29e347a7c4a9883e38f563487fbc01b8cd /main.lua | |
| parent | 48684ad8ada148db99828f3991a8d79e51abeef3 (diff) | |
Fixed crash after messages ran out
Diffstat (limited to 'main.lua')
| -rw-r--r-- | main.lua | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -79,8 +79,10 @@ function love.mousereleased(x, y, button) for i=1,6 do icon[i].cl = false end - if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then - v1.c.chat.next = false + if v1.msgs[v1.c.chat.msgs] ~= nil then + if string.len(v1.msgs[v1.c.chat.msgs]) == string.len(v1.c.chat.msg) and v1.yes == true then + v1.c.chat.next = false + end end end function love.draw() |
