Error 7922

100317

New Member
Hi!

I have written and modified a program many times. Yesterday I included the following program lines and got an error:

If b8 = 0 then
if b9 = 9 then
if b10 = 0 then
if b11 = 0 then gosub musik

Error Message:

EEPROM 30,('abcdefghijklmnopqrst')
^

[ 7922 ]

This line is near the End of the programm.

Chip: 28x1 version A.0
Editor Version: 5.2.2
Memory used: 1047 Bytes (without the above commands)

Any ideas?

Thanks in advance.
Hans
 

hippy

Technical Support
Staff member
I'm not sure where the "[ 7922 ]" error originates from but we will investigate that; are you using a non-English language setting ?

The error is within the EEPROM command, the other additions should not have affected that command, it fails syntax checking even by itself ...

EEPROM 30,('abcdefghijklmnopqrst')

You need to use double-quotes ( " ) rather than single-quote ( ' ) to specify text strings. The single-quote indicates the start of a comment so the compiler sees the command as -

EEPROM 30,(

which generates a syntax error, which is what I would guess "[ 7922 ]" should be stating.
 

100317

New Member
Hippy,
Thank you for the quick reply.

Very sorry, I have cut and pasted the Error message without checking.

The correct Message:

EEPROM 30,("abcdefghijklmnopqrst")
^
[ 7922 ]

Many Thanks.

Hans

(yes, I use a different language setting).

The ^ should point to the double quotes.

If I remove the if-then statements, the program seems to be OK.
 
Last edited:

hippy

Technical Support
Staff member
Hans, I have found the problem ...

[ 7922 ] = "EEPROM cannot be used within If blocks"

In your "If b8 = 0 then" or similar, there is no closing "End If", add those and the problem should go away.

If you want a multi-conditional If-THEN-GOSUB you can use AND ...

If b8 = 0 And .... And b11 = 0 then gosub musik

We will resolve the "[ 7922 ]" issue for non-English language settings. Should you encounter similar problems, temporarily switching to English should give a more meaningful error message.
 
Last edited:

100317

New Member
I'm confused now.
Yesterday I used:
If b8 = 0 and b9 = 9 and b10 = 0 and b11 = 0 then gosub musik

and got an Syntax Error.

Afterwards I modify it as shown in post #1 and got the Error Message 7922.

Today I use the 'and' as recommendet and now it works.

Many thanks Hippy for quick response.
 

hippy

Technical Support
Staff member
I expect there was some error is the original IF which wasn't immediately obvious, then, having changed course and run into a more confusing isssue, whatever was originally wrong has been long lost.

I've run into similar problems where I just cannot see what is wrong with a statement. I rewrite the line, building it up in parts to see what causes an error, and end up with what seems to be the same as it was but with no syntax error. Usually it turns out to have been a typo - I usually comment the original so I can compare with the new and there's often a transposed latter or similar which my brain just won't catch no matter how hard or long I stare at it !

Anyway, at least this problem is solved and you can get back to PICAXE programming.
 
Top