I son't know why this won't work

cloudee1 ok here is the problem I am having with this

I f you have trap and have not smoked with rat then setting the trap seems to work, if you have smoked with the rat and the try to set trap then it says that the trap is already set.

(if(not (TRAP_SET))
(if(send gEgo:has(INV_TRAP))
Print("You spot a good place to set the trap!")
(send gEgo:put(INV_TRAP))
(if(not (SMOKE_WITH_RAT))
(send gGame:changeScore(2))
)(else (send gGame:changeScore(4)))
)(else Print("What trap?"))
)(else Print("You have already set the trap!"))

the default for TRAP_SET is false
the default for SMOKE_WITH_RAT is false
Robin_Gravel When the ego put the trap on the ground, the trap is not supposed to set up?

Do you wish to see the trap is put on the ground and set up for later?

Robin Gravel
Eigen Are the TRAP_SET and SMOKE_WITH_RAT global vars? Try compiling all scripts.

cloudee1 well yes robin actually when it is done i hope to have the trap set up so that you can see it but for now I'm just trying to get this part to function before I add more steps to it.

Eigen those are both global variables and I compile and rebuild ALL of the time. I recompiled each script and the same scenario happens.

so uhm does this piece of script seem to be ok then?

... Later On ...

So I think this bit was ok I was working on the script in another room where I had some sloppy script, and now everything seems to work , but it didn't have anything to do with the trap's condition, but who am I to complain, maybe recompiling helped after all?

So Robin back to that placing trap thing i just figured I'd make the TRAP_SET global variable into a number 0-4 because there's 4 possible rooms to place the trap in, then if you set it in the living room say = TRAP_SET 2. then in the init part for the living room I'd hide a view of the trap, unless it's set in room 2 then I'd show it. ...does that sound about right?
Robin_Gravel Hmmm.

I"m wondering if there is a command obj.in.room("banana",v0) like in SCI?

Robin Gravel
cloudee1 I have no idea what you just said ::)
Robin_Gravel obj.in.room("banana",v0) is one of AGI commands.

It tells the program the obect banana is in the current room.
If (obj.in.room("banana",v100)) {

If the banana is in the room 15, then....

You know, I made many AGI games like Naturette, Serguei's destiny. Other AGI games are in developement.

Robin Gravel
cloudee1 Yeah I've come straight into sci.