Ask coding questions

← Back to all posts
“sellall” command not working
Archonic7 (2)

As you can see in my code, I have programmed a “sellall” command that allows a player to sell their entire inventory. However, it is not currently functioning. I think it might be an InvalidArgumentException, and I have tried to edit my catch branch to print the error instead, and not just say “Invalid value.”, but somehow the code instead just prints “Invalid Value.” like before.

Comments
hotnewtop
AntimatterDev (40)

i see another error in the code. your GRASS("Dead Blade of Grass", 500,99999999999); is saying that the 9 number is too large.

Archonic7 (2)

@AntimatterDev Yeah, I’ll edit that part. Do you have any suggestions for my main post?