ava-cassiopeia / discord-text-adventure-bot

A bot for Discord to play text adventure games in Discord
ISC License
45 stars 7 forks source link

CRASH ON $start A #34

Open PlushBanshee opened 5 years ago

PlushBanshee commented 5 years ago

crash on game load and yes i got dfrotz.exe but where do i place it in what path and who to get a .z5 game to run

Loaded Game: A events.js:183 throw er; // Unhandled 'error' event ^

Error: spawn dfrotz ENOENT at _errnoException (util.js:1022:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:372:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

PlushBanshee commented 5 years ago

image config image games folder image

ava-cassiopeia commented 5 years ago

You will need to add dfrotz not to the games folder but to your path. I've assumed that you're using Windows because that screenshot looks like the Windows file explorer, but please correct me if otherwise. In general, you should follow these steps:

  1. Move dfrotz.exe into C:\users\{your username}\bin\
  2. Locate the tool to edit your system path. The instructions provided by Oracle for Java (link) are useful, but once you have clicked the "edit" button in Windows, add the following to the end of the path (do not wipe out the existing value, just append to it): ;C:\users\{your username}\bin\ (or wherever you put dfrotz.exe)

Of course, replacing {your username} with your actual Windows username. You can verify that you did these steps by performing the following afterwards: opening a new terminal/command line window and typing dfrotz and pressing enter. If it gives you some sort of "unrecognized command" or similar, then you have failed.

Please let me know if those instructions are useful.

PlushBanshee commented 5 years ago

image

PlushBanshee commented 5 years ago

image ahh wait linux found it

PlushBanshee commented 5 years ago

image okay i got this to show in the windows linux terminal i fixed the spelling mistake with the user folder name but it still crashes when i try to run a game

PlushBanshee commented 5 years ago

i did sudo npm run start did $targetChannel $start game and it crashed image

ava-cassiopeia commented 5 years ago

Can you try running the game in the terminal using dfrotz directly? IE.

dfrotz path\to\{game name}.z5

And let me know if that runs as expected?

PlushBanshee commented 5 years ago

image

PlushBanshee commented 5 years ago

is there by any chance we can talk this over discord i built bots before but this is new to me adding .exes to node,js scripts i really like the idea of this bot and i got a tone of .z# games ready but i'm still at a loss? image

ava-cassiopeia commented 5 years ago

Per discussion on Discord, this looks like an actual bug with the bot, which I'll try to address. The game in question seems to be Asylum.z5 from this link, and repro steps are:

$targetChannel
$start Asylum
$south

On a Windows machine.

ava-cassiopeia commented 5 years ago

Cannot reproduce with latest version of bot; please see screenshot below.

System: macOS running dfrotz.

Screen Shot 2019-07-16 at 3 37 18 PM
KawaiiFiveO commented 4 years ago

Experiencing same issue. dfrotz is installed normally, can be used to play the game from any location. Bot works until starting a game and entering a command, crashes with the same "throw er, unhandled error event".

Running Raspbian (Debian variant). All packages reinstalled and updated with npm wherever possible.

Capture

2020-06-18T15_37_36_232Z-debug.log

ava-cassiopeia commented 4 years ago

I've created #39 as a direct copy of your comment, @KawaiiFiveO , just so I can keep the two discussions separate. If it turns out they are related, then I'll update this issue with the findings.

ava-cassiopeia commented 4 years ago

The bot has been updated to a new framework, so this bug might be solved, but since I couldn't reproduce it, I'll leave it open for a bit.