Hi guys, back from YUK!!! jury duty
anyways.. (still totally addicted to qb64 )
I notice this does not seem to be workingCode: QB64: [Select]
var totalRooms is pulled from an ini file. I am created a text engine, so some parts of it are user controlled for run time.
But I seem to be getting a subscript out of range error.
Is this not a valid method?
Agreed however here is there puzzle (love puzzles)
x = 64
dim room(64) <-- no compile error
dim room(x) <-- no compile error
runtime:
room(64)=2 <-- no error
room(x) = 2 <-- subscript out of range error
It's an old fashion error, so very familiar with it. but the above puzzle should not error out - Im gonna keep searching... I know the harder these are - the simpler the solution is.
this I did, all came up correct. Even when the error popped up, i just kept hitting yes and it was displaying everything correctly.Agreed however here is there puzzle (love puzzles)
x = 64
dim room(64) <-- no compile error
dim room(x) <-- no compile error
runtime:
room(64)=2 <-- no error
room(x) = 2 <-- subscript out of range error
It's an old fashion error, so very familiar with it. but the above puzzle should not error out - Im gonna keep searching... I know the harder these are - the simpler the solution is.
These type errors are usually solved by simply adding a PRINT x to the code in multiple places. See what value x has, and when/where it gets corrupted in your code.
this I did, all came up correct. Even when the error popped up, i just kept hitting yes and it was displaying everything correctly.Agreed however here is there puzzle (love puzzles)
x = 64
dim room(64) <-- no compile error
dim room(x) <-- no compile error
runtime:
room(64)=2 <-- no error
room(x) = 2 <-- subscript out of range error
It's an old fashion error, so very familiar with it. but the above puzzle should not error out - Im gonna keep searching... I know the harder these are - the simpler the solution is.
These type errors are usually solved by simply adding a PRINT x to the code in multiple places. See what value x has, and when/where it gets corrupted in your code.
BUUUUUUUUUUUUUTTTTTTTTT
I just got an idea. You guys got my gears going again..
One of the oldest projects (like back in the 80's) I always wanted to make since Zork came out was my own custom simple text-adventure game/editor. It became huge obsession after I wrote Eliza(David h. Ahl), But I just never had the experience back in those days.
SOLUTION:
I was focusing on writing a "Player"... I just realized, I'll just write an "Editor" , save all that is needed in records. then pull those records up in the player
See
simple solution...