strange problem

Joey this is really messed up. in dq2, i used this code.

if (said("talk","man")) {

i have this somewhere below the draw(o0); command.
when i play the game and type talk man, it says i do not understand your request. i added the commands in the words.tok file. i dont know whats wrong. any ideas?
Kon-Tiki Check if it's between the f(5)-brackets or not. You've probably placed it a few lines too high.

Joey ok ill look. but i placed it below the if (said("examine")) {
command, and the examine command works fine. ill look again though.
Xqzzy Rcxmcq Just wondering, do you have any ("talk","anyword")
arguments in that room's logic? If so, make sure that "talk","man" is ABOVE ("talk","anyword")
Joey i dont have that in my logic i dont think. im gonna look at it today and try and see whats wrong.
Joey hmmm, what i noticed is all commands in the logic wont work that have if(said("talk","word")) { or something like that. cause i did the if(said("talk","man")) { and that didnt work, then i also put in if(said("open","door")) { that also didnt work. when i tried each command, it said i do not understand your request. but if i keep it as a work like if(said("open door")) { it works. i dont get it. the words are in the words.tok file. whats wrong with it?
sonneveld yes but are "open" and "door" separate words in the dictionary?

- Nick
Joey i think so. talk and man are separate words in the words.tok file.
Joel well, if the words weren't in the words.tok file, the logic wouldn't compile.

Did you try putting the line


before the if statement that's not working and seeing if that makes a difference? that will at least tell you if there's another said test causing your new one to be ignored.

Also have you tried putting some output to the screen right before the said test (via display, I believe -- definitely don't use print cause if it works you'll have your work cut out for you exiting the game gracefully)? An incrementing variable might be nice (it would let you see that you are actually getting to that code every interpreter cycle).
Joel and, of course, when in doubt, go simple -- do these tests work in other logics? if you have a logic with nothing in it but these said tests, will it work then?
Joey i dont know what it is. whatever
if(said("word","word")) {

command i put in, when i type it in it says i dont understand your request and i tried having 2 below each other. ill mess with it a little later.
Kon-Tiki Check the placement of curly brackets. It's an easy thing to look over, but one wrongly-placed curly bracket can mess up the entire code. I really suggest checking the brackets. It feels like the problem's somewhere around there.

Joey ok thanks kon tiki. i will look at that. and tomorrow i am going to try to get a majority of the game finished cause im gonna be home alone all day so it will be nice and quiet and no one will be telling me to get off the computer. so hopefully i wont get too many bugs and will be able to fix any i get.
Joel did you try what I suggested? those things will give you a better idea of what to look for and will hopefully save you some of the tedious time that you'll spend checking the matching of your curly braces.
Joey im gonna everything. im gonna get it fixed today.
Joey maybe it would be easier if I showed you the logic :P. here. i attached it.
Joel (not logged in) there's nothing wrong with that code that I can find. I created a blank game from the template game and pasted that code as a new logic in that game, then added all the appropriate words, and it worked fine.

so, do this:

if (said("examine")) {
print("There is a man at the ticket counter, and a door that reads "
"'bathroom'. Hey, is that shit on the ground near the bathroom door?");

// don't know the number off the top of my head;
// you should use defines anyway

if (said("talk","man")) {

and see if that changes anything.
Joey GRRR! this did not work either! how come in other games they dont need that command? and where exactly do i put the command? i tried putting it in numerous places and it wont work. i dont know whats wrong. and what about those numbers you were talking and the defines thing? i have #include defines.txt at the top and thats it. i dont know whats up here.
Eigen Joey, try putting the logic you attached into a new fresh game and see if it works. If it works then you know something in some other logic causes this.

Or maybe you've edited something in logic.000 or logic.090

Joey well if it worked with joel, it would work if i created a new game, so it must be something in a logic file. any ideas?
Andrew_Baker Yeah, check your other logics like Logic.000 to see if they are calling any logics that are parsing your commands before your current room logic is. And I can't stress enough that you add some debug logic into your rooms, so by going into debug mode, you'll get a display of what's going on.
Joey im not so sure what you mean. what do you mean by see if other logics are parsing?
Joel Joey, would you mind sending me the game with full source? Of course, under the promise that I'll delete the entire thing immediately once I'm finished looking for your problem and that I won't release it to anyone else.

And do rebuild your vol files if you decide to do that, and let me know you've done it here, because I probably won't check the e-mail I've got listed here unless I know it's coming.

If you do that, I'll try to figure out exactly what's causing the bug.