Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Alchemy - A word Game
#11
@PhilOfPerth

Recommend

If _FileExists( " The file" ) Then
.... OK to open
else
Plan B
end if
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#12
Finally!!! (I hope)

The file called Pairs was being retrieved from my QB64 folder, so I didn't realize it would need to be included in the zip - I thought it would just be created when you ran it. I've included it in a third version. 
The plus side of all this is that I've learned something (even if I forget it by tomorrow). Thanks, Teacher. Big Grin

Just saw your last post, about if (_fileExists), and recall something from the dark recesses of my mind about that. Yes, that's what I should have done.


Attached Files
.zip   Alchemy.zip (Size: 3.96 KB / Downloads: 138)
Reply
#13
It's coming back to me now!
Open"filename" for append as #1
I think this looks for the file and, if it doesn't exist, creates it. I'll check further
Reply
#14
No, bplus, your method is better.
The Append method works, but you end up with a new bunch of words appended each time, so the file gets longer. It could be adapted I spose, but I'd end up with something like the
If _fileexists .
It was worth a look though. Rolleyes
Reply
#15
Uh, @PhilOfPerth, uh, Is there supposed to be a dictionary file to check words the player types in to transition from one word to next?

I am getting more file missing errors around line 211, 212

I think this will be a great game. I like how you are trying to preserve the best bridge of words from first to last. So I am going to keep pestering you until it's setup correctly, sorry ;-))
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply
#16
I've done it again, sorry.
Yes, the dictionary files were supposed to be attached also. They are now.
They're split into 26 files to speed up searching.
Thanks for your patience and help.
I hope everything's ok now, but I'll download again to check. It's a bit hard to check though as it finds the dictionary files when I run it.
Reply
#17
I've done it again, sorry.
Yes, the dictionary files were supposed to be attached also. They are now.
They're split into 26 files to speed up searching.
Thanks for your patience and help.
I hope everything's ok now, but I'll download again to check. It's a bit hard to check though as it finds the dictionary files when I run it.
.zip   Alchemy.zip (Size: 608.79 KB / Downloads: 156)
Reply
#18
Hello.
I tried to run it in the QB64 directory on my own "qb64 \ Alchemy" directory, but I could not because it is looking for files in the qb64 directory. I changed lines 150 and 166 to put the qb64 \ Alchemy directory but it stuck to Sub CheckWord and its variables.
I do not intend to modify it further.

Thank you very much.

Regards
Reply
#19
Hi gaslouk
Yes you were correct, there was a file missing, as bplus pointed out earlier.
This has been fixed, and you should be able to run it if you re-download it.
Sorry for the inconvenience, and thanks for trying it. Blush
Reply
#20
Fixed line 207
filename$ = UCase$(Left$(try$, 1)) + "-Words.txt" ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< fix line 207
[Image: A-chemy.png]
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Word Search Maker SierraKen 27 5,006 01-21-2026, 12:53 AM
Last Post: SierraKen
  Random Access word-list maker PhilOfPerth 0 570 03-06-2024, 03:59 AM
Last Post: PhilOfPerth
  Word (text) processor krovit 19 4,428 09-02-2023, 04:38 PM
Last Post: grymmjack
  Not ANOTHER word-game! PhilOfPerth 12 2,444 01-30-2023, 11:27 PM
Last Post: PhilOfPerth
  Alchemy is fixed! PhilOfPerth 30 6,343 11-24-2022, 08:05 AM
Last Post: PhilOfPerth

Forum Jump:


Users browsing this thread: