Closed v6 closed 3 years ago
'snot just for Tyrone either:
Command?add --times 5 --target giant-rat rattigan-the-rat
2d6
oneechan makes awkward-sounding noises at you, enter the 'exit' command to exit.
Traceback (most recent call last):
File "basic.py", line 701, in run_assistant
running = parse_command(command_input_string)
File "basic.py", line 681, in parse_command
command_result += str(funcDict[command](argDictCopy))
File "basic.py", line 509, in addCreature
applyInit({"target" : nick})
File "basic.py", line 292, in applyInit
combatant["initiative"] = statMod(combatant["dexterity"]) + roll("1d20")
File "basic.py", line 240, in statMod
return math.floor((stat-10)/2)
TypeError: unsupported operand type(s) for -: 'collections.defaultdict' and 'int'
initiative name type hp/max_hp
22 giant-rat giant-rat 3/3
12 sahuagin#1 sahuagin 11/11
9 goblin goblin 9/9
3 druid druid 21/23
Command?
--identity is for Nick names
On Sat, May 22, 2021, 1:56 AM Nathan Basanese @.***> wrote:
'snot just for Tyrone either:
Command?add --times 5 --target giant-rat rattigan-the-rat 2d6 oneechan makes awkward-sounding noises at you, enter the 'exit' command to exit. Traceback (most recent call last): File "basic.py", line 701, in run_assistant running = parse_command(command_input_string) File "basic.py", line 681, in parse_command command_result += str(funcDictcommand) File "basic.py", line 509, in addCreature applyInit({"target" : nick}) File "basic.py", line 292, in applyInit combatant["initiative"] = statMod(combatant["dexterity"]) + roll("1d20") File "basic.py", line 240, in statMod return math.floor((stat-10)/2) TypeError: unsupported operand type(s) for -: 'collections.defaultdict' and 'int' initiative name type hp/max_hp 22 giant-rat giant-rat 3/3 12 sahuagin#1 sahuagin 11/11 9 goblin goblin 9/9 3 druid druid 21/23 Command?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rjb25/5e-dm-assistant/issues/16#issuecomment-846356025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7UJNZM3OJAZ66BWKAUCNTTO5BPJANCNFSM45KJWZWA .
Full command should be add --times 5 --target giant-rat --identity rattigan-the-rat
Looking into a better error message for this.
Resolved and future issues should be easier to find.
Looks like we've got a lot of cases of collection defaultdict getting compared to integer values.
Not sure what's going on here, but here's just one example: