I want to print out a structure member from an array and RabbitWeb gives me a "ZHMTL ERROR: Unknown variable error. The variables are declared globally and registered via the #web command.
struct meas1_type {
char year;
char mon;
char mday;
char hour;
char min;
char sec;
char rh;
char temp;
} meas1 [MEAS1_SIZE];
#web meas1;
int idx1 = 0;
#web idx1;
Here is applicable portion of the RabbitWeb script:
idx = << OK
IdxTimeTempJumid
<< OK
:
: << Error
<< Error
The “print($idx1)” and the “print($meas1[0].hour” execute correctly. The two “$meas1[$idx1].xxxx” outputs have the errors. I have used “$meas1[$A].xxxx” in the past with a loop with no problems.
Why is RabbitWeb throwing an error for $meas1[$idx1].xxxx"?