silly question: say #text # isn't working
thymetuo
27 Aug 2017, 21:05I'm running the web app and I've typed in things what appears to be identical to what the tutorial has but with a single if... statement to separate it based on what room the player is in. Still, the game says it doesn't recognize the command.
Under the command pattern, I have "say #text#" (with no quotes, but that's the full thing I have).
My scripts are: If player is in room/object/ocean, I have it to print the expression "I say "" + text + "", but it's a bunch of bubbles and no one can understand me."
Else, it should print the expression "I say "" + text + "", but it just sounds like a bunch of seal noise."
When I save and try to play, it says it doesn't recognize the command! I'm so frustrated, but I know for certain it's some silly thing or typo I've made, but any help would be super appreciated.

K.V.
27 Aug 2017, 21:42Hello,
It should be say #text#
.
say #text
won't capture it.
thymetuo
27 Aug 2017, 21:48Ah, yes! That's actually what I have; my OP is a typo. I've edited it now.

Doctor Agon
27 Aug 2017, 22:08If I remember correctly, if you want speech marks as part of the message, you have to put a back-slash , (the key to the left of the z)
msg ("You say \"" + text + "\", but nobody replies.")
thymetuo
27 Aug 2017, 22:12My code so far matches that, as far as I know. Apparently the formatting of this forum is having things get a little wonky. I wish I could post a screenshot or even get the full code view for the if statements, but I appear to only be able to view this.
msg ( "I say \"" + text + "\", but it's a bunch of bubbles and no one can understand me.")
Is it possible that it relates to how I'm phrasing the "if the player's in the room Ocean"?
Under "scope" it has a room name option, but I didn't know exactly how to get that working, so I used the if statement "if player is in room / object / ocean" inside the scripts rather than making the scope of the command in the room ocean.

Doctor Agon
27 Aug 2017, 22:21On the top of the scripting box, you'll see a load of icons, you'll see one that looks like a pair of scissors, 'cut', then copy, then paste. The next one along looks like a folder tab. Click that one and it swaps between code view and GUI view. You are then able to copy and then paste your code into the forum, using the ``` format.
thymetuo
27 Aug 2017, 22:26oh thank you!!
if (game.pov.parent = Ocean) {
msg ("I say \"" + text + "\", but it's a bunch of bubbles and no one can understand me.")
}
else {
msg ("I say \"" + text + "\", but it just sounds like a bunch of seal noise.")
}

Doctor Agon
27 Aug 2017, 22:33The script works fine for me. Have you got this set up as a 'Command pattern' or 'Regular expression'. Because they handle the command in different ways.
jmnevil54
27 Aug 2017, 23:31Usually it's a problem with the quotation marks. Sometimes not, but mostly.
I had a problem on my game, also online, too. I tried to type "Heal Potion" as the command type, but it wouldn't recognize it either. So I typed it in as "Heal Potion #object#" and it worked. However, while playing the game you need to type "Heal Potion Potion bag" to get it to work, without clicking on the verb/command anyway.
thymetuo
28 Aug 2017, 03:13I'm sorry I stepped out for so long, but I have it written as command pattern.
I played around with a few things, but I ended up having to "build" the script over again before it worked.
I don't know what the problem was, but at least I got it to work.
Thanks for the help everyone! Thanks especially to Doctor Agon for being able to find the GUI code. Going to be using that a lot in the future.
The Pixie
28 Aug 2017, 05:20This will not resolve your problem but a better spproach is to hsve a command in the room:
http://docs.textadventures.co.uk/quest/commands_for_room.html