The toggle is a device.
The toggle is switched on.
If the toggle is switched on:
say "Hi there.".
The third line shows an error about punctuation, saying the phrase doesn't make sense. How is the punctuation wrong, it seems completely fine?
The error message is a bit misleading, but the core issue is that you need context for the if phrase. In other words, you need to define when the condition should be checked, otherwise it's too vague.
It's not entirely clear what you want the code to do, but you could have for example:
Every turn:
if the toggle is switched on:
say "Hi there."
Related
I'm experiencing a strange typing issue that occurs when typing in some consoles. It's not a keyboard issue, because this doesn't happen when I type in a text editor like Atom or a regular application like Word. It doesn't even happen in every console -- repl.it gives me no issues. However, it happens in many coding consoles. I start typing, and when I finish one word and hit the spacebar or a parens or bracket, the thing I just typed gets duplicated out on the same line. Here's a quick video of it happening: https://imgur.com/a/MlFVD
I've encountered a Oracle Form which has a strange behavior. It seems that it looses the spanish character "ñ" when converting it from Oracle 10gR2 to Oracle 11gR1. This only seems to happen in Text Field Prompts. The rest of the elements in the form seem to display the characters properly. Any suggestions as to what might cause this or what to check to fix it? I've already have checked that the fonts installed support this character and that the NLS related settings look ok.
Well, after a whole day trying to determine what the problem was, it seems that the simplest answer was the right one: The original developer for this form seemed to want to assure that the character was displayed properly and he had a bad setup, so he was setting the text using the SET_ITEM_PROPERTY function, and using the CHR function to escape the character. Something like the following:
SET_ITEM_PROPERTY('BLOCK.PASS_FIELD', PROMPT_TEXT, 'Contrase'||CHR(241)||'a: ');
That for the prompts for the fields which were titled "Contraseña: " in their properties.
In the current set up, it works, but on this new environmet, we are using an UTF8 encoding and the code for the letter "ñ" changes completely. Just for the sake of completeness the code in utf8 would be CHR(50097). But I suggest it would be better just to ask your DBA or SYSADMIN to fix the NLS settings so you can just use the prompt or field properties and don't have to get this "creative" and make other dev waste too much time.
It never ocurred to me to check for this, because the properties seemed to be set up correctly, but a simple test of creating a new field with the same properties finally showed me that the problem was specific to the 4 fields which were already created and searching for code-based attribute changes led me to find this was the issue. So I leave this answer here in the hope that someone else saves a few hours of his time and checks for the simple answer first.
my client is saying that she couldn't register on our website and getting error
When she was registering, she would enter all the information, and when she would click through, an error message would tell her that the name field only allowed letters and not numbers. She wasn't entering any numbers.
Could this be a problem with her browser? (She is using Internet Explorer.) Her computer? What else could it be?
I tried it, and it worked for me.
i am using regular expression
ValidationExpression="^[A-Za-z]+$".
She might not be entering numbers, but is that all your error message states?
She might be entering punctuation, symbols, or spaces.
Copying and pasting something in could also leave a trailing space which would fail your validation.
Perhaps her name has a hyphen, apostrophe or accented character in it. If it is a full name, then it is probably erroring on the space between the forename and surname!
Avoid restricting what users are allowed to input as you'll usually end up stopping people from entering things that should be perfectly acceptable, just use suitable escape sequences (e.g. with paramertised queries for databases or converting <, >, &, " and ' to their respective entities for HTML) before putting the data anywhere.
I'm assuming you're not a technical person. The chances are that the name entered has and apostrophe, space, or anything that isn't between a-z.
The reason you are getting this message is because whoever created the system has told is to say that when the name doesn't match the regular expression, even though it probably has nothing to do with entering a number.
Ok, I'll say it a thousand times. Never assume what the end user is saying is true or what they claim to be doing is what they actually are doing. Not that they are deceitful, just they often don't know.
I recommend using a remote desktop software such as Co-Pilot (no, I don't work for fogcreek) and connecting to any user that can replicate this issue and view it happening for yourself.
Once you can verify it is indeed happening, you should be able to replicate it from your end and then submit it to the developers (or yourself) to be fixed
I'ts not a browser-related problem. ASP.NET form validation is server-side.
I'll eat my hat if I get a good answer to this...I suspect that although I'm a rank beginner in Inform 7, and I'm guessing this isn't that hard, there are probably not many people here who are familiar with Inform 7. Still, nothing ventured...
I'm trying to create a custom response to a "pull" action. Unfortunately, I think the "pull" action doesn't normally expect a second noun. So I'm trying something like this:
The nails are some things in the Foyer. The nails are scenery.
Instead of pulling the nails:
If the second noun is nothing:
say "How? Are you going to pull the nails with your teeth?";
otherwise:
say "I don't think that's going to do the job."
But while this compiles, and the first part works, the "I don't think..." section is never called...the interpreter just responds "I only understood you as far as wanting to pull the nails." Do I have to create my own custom action for this? Overwrite the standard pull action? Am I missing something simple that will allow me to get this to work?
Have you extended “pull” from the Standard Rules to accept a second noun? As I understand it(*), the standard “pull” doesn't know about “with”. I guess something along the lines of:
Pulling it with is an action applying to two things.
Understand "pull [something] with [something preferably held]" as pulling it with.
Instead of pulling the nails:
say "How? Are you going to pull the nails with your teeth?";
Instead of pulling the nails with something:
say "I don't think that's going to do the job."
*: Warning: I don't understand it at all, and have no idea what I've talking about. :-) I've avoided version 7 of Inform as some kind of Chomskyian nightmare...
See code below, for some reason it only works when I put a breakpoint on line 2 (*) is there some delay? Is it starting the next line before it finishes the 2nd one?
dp.SSLCertStoreType = nsoftware.IBizPayPal.DirectpaymentSSLCertStoreTypes.sstPEMKey
*dp.SSLCertStore = My.Computer.FileSystem.ReadAllText(Server.MapPath("\cert_key_pem.txt"))
dp.SSLCertSubject = "*"
Note: The error is thrown on the 3rd line only when the breakpoint is set on the 2nd line, after releasing the break the program executes my paypal purchase via credit card.
I will post the error again I am replicating it now...
System error: Could not acquire security credentials: error 8009030E.
There it is, while it should say "Order Confirmed!" type message if working correctly.
Almost certainly a threading issue, but nobody is going to be able to answer definitively unless they're familiar with nsoftware.IBizPayPal
Sometimes you can find that breaking can mutate an object's state, due to the locals window evaluating object properties. If they have a side-effect, then all bets are off, unfortunately :( No idea whether this is happening in your case.
I have no knowledge of ASP, so just wondering aloud: Could this be due to multithreading? You know when you put a break point you sort of freeze execution of all threads, but not so in the real execution.