Author Topic: strange problem  (Read 5386 times)

0 Members and 1 Guest are viewing this topic.

Joey

  • Guest
strange problem
« on: August 18, 2003, 03:03:20 PM »
this is really messed up. in dq2, i used this code.

if (said("talk","man")) {
  print("hello.");
}

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

  • Guest
Re:strange problem
« Reply #1 on: August 18, 2003, 03:06:24 PM »
Check if it's between the f(5)-brackets or not. You've probably placed it a few lines too high.

-Kon-Tiki-

Joey

  • Guest
Re:strange problem
« Reply #2 on: August 18, 2003, 03:09:36 PM »
ok ill look. but i placed it below the if (said("examine")) {
command, and the examine command works fine. ill look again though.

Offline Xqzzy Rcxmcq

Re:strange problem
« Reply #3 on: August 18, 2003, 08:12:03 PM »
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")
 
« Last Edit: August 18, 2003, 08:14:17 PM by Xqzzy Rcxmcq »
Pathfinder. After I finish CIMS 2004.

Joey

  • Guest
Re:strange problem
« Reply #4 on: August 19, 2003, 08:28:05 AM »
i dont have that in my logic i dont think. im gonna look at it today and try and see whats wrong.

Joey

  • Guest
Re:strange problem
« Reply #5 on: August 19, 2003, 03:32:41 PM »
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?

Offline Nick Sonneveld

Re:strange problem
« Reply #6 on: August 19, 2003, 09:10:13 PM »
yes but are "open" and "door" separate words in the dictionary?

- Nick
Nick Sonneveld  |  AGI Dev  |  NAGI

Joey

  • Guest
Re:strange problem
« Reply #7 on: August 21, 2003, 07:02:17 PM »
i think so. talk and man are separate words in the words.tok file.

Offline Joel

Re:strange problem
« Reply #8 on: August 21, 2003, 08:08:03 PM »
well, if the words weren't in the words.tok file, the logic wouldn't compile.

Did you try putting the line

Code: [Select]
reset(input_parsed);
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).

Offline Joel

Re:strange problem
« Reply #9 on: August 21, 2003, 08:10:03 PM »
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

  • Guest
Re:strange problem
« Reply #10 on: August 22, 2003, 08:24:10 AM »
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

  • Guest
Re:strange problem
« Reply #11 on: August 22, 2003, 08:53:07 AM »
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 new.room-curly brackets. It feels like the problem's somewhere around there.

-Kon-Tiki-

Joey

  • Guest
Re:strange problem
« Reply #12 on: August 22, 2003, 07:46:26 PM »
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.

Offline Joel

Re:strange problem
« Reply #13 on: August 23, 2003, 01:12:26 AM »
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

  • Guest
Re:strange problem
« Reply #14 on: August 23, 2003, 09:08:37 AM »
im gonna everything. im gonna get it fixed today.


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.039 seconds with 21 queries.