SomeoneElse37 / BattleBot

A Discord bot that rolls dice and stuff.
MIT License
0 stars 1 forks source link

ValueError: invalid literal for int() with base 10: '' #2

Closed lenscas closed 7 years ago

lenscas commented 7 years ago
Traceback (most recent call last):
  File "battlebot.py", line 1632, in on_message
    reply = getReply(message.content, message)
  File "battlebot.py", line 1589, in getReply
    return makeChar(codex[1:], message.author)
  File "battlebot.py", line 1086, in makeChar
    char = Character(author, codex[0], codex[1].lower(), makeStatsFromCodex(codex[2:]))
  File "battlebot.py", line 488, in makeStatsFromCodex
    return makeStatDict(int(codex[0]), int(codex[1]), int(codex[2]), int(codex[3]), int(codex[4]), int(codex[5]))
ValueError: invalid literal for int() with base 10: ''

how to reproduce, make a character like /makechar awesome elfcat 7 6 5 4 3 2 characters like /makechar awesome elfcat 0 0 10000 0 0 0 do work however.

SomeoneElse37 commented 7 years ago

My guess is that you put an extra space in there somewhere. The precise command you quoted did not cause an error for me.

lenscas commented 7 years ago

Going to lock this as I also have seen it working correctly multiple times now. For error messages in general see #5