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
b = b + ...
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: 38)
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 ;-))
b = b + ...
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: 45)
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]
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)