expected numeric operand and column 9: M117: string too long
-
Not sure why I am getting this error. currently, if I echo job.filePosition and echo job.file.size. I get numerics for both. But when i try to do math, it doesn't work and i get an error stating it needs numerics. However, didn't I just provided numerics?
if {job.filePosition/job.file.size}>=0.1 M117 "AKM print completed 10%"
also i get the Error: column 9: M117: string too long for the M117 command when it is part of a conditional command. I saw another post from github where DC42 mentioned to put M400 immediately before the M117 command. it still gives the same error.
Entering M117 "AKM print completed 10%" straight into the console works perfectly.
-
Does it just need some spaces to separate the elements, so the parser can identify them?
if { job.filePosition / job.file.size } >= 0.1 M117 "AKM print completed 10%"
-
@tekstyle which firmware version? Standalone mode or with attached SBC?
-
3.3. duet2wifi. so standalone
-
@tekstyle I've tested that running as a macro under RRF 3.4beta7, and I don't get any error messages. So I believe whatever the issues were have been fixed. Please try that version.
EDIT: I did find an issue that doesn't give rise to any error messages. It is triggered by the M117 line being very long. Your M117 line has a lot of space characters after the trailing quotation mark, so it is triggering this issue. I will fix it in RRF 3.4.0rc1.
-
i updated to 3.4beta7 and as you said, the issue is no longer there. I did not realize there was a trail of space characters at the end of the quotation mark. that was a good catch and many thanks. I will try to test my macro later. I plan to put this into daemon.g
if job.file.fileName!=null if {job.filePosition}/{job.file.size}>=.09 & {job.filePosition}/{job.file.size}<=.11 M117 "AKM print completed 10%" elif {job.filePosition}/{job.file.size}>=.19 & {job.filePosition}/{job.file.size}<=.21 M117 "AKM print completed 20%" elif {job.filePosition}/{job.file.size}>=.29 & {job.filePosition}/{job.file.size}<=.31 M117 "AKM print completed 30%" elif {job.filePosition}/{job.file.size}>=.39 & {job.filePosition}/{job.file.size}<=.41 M117 "AKM print completed 40%" elif {job.filePosition}/{job.file.size}>=.49 & {job.filePosition}/{job.file.size}<=.51 M117 "AKM print completed 50%" elif {job.filePosition}/{job.file.size}>=.59 & {job.filePosition}/{job.file.size}<=.61 M117 "AKM print completed 60%" elif {job.filePosition}/{job.file.size}>=.69 & {job.filePosition}/{job.file.size}<=.71 M117 "AKM print completed 70%" elif {job.filePosition}/{job.file.size}>=.79 & {job.filePosition}/{job.file.size}<=.81 M117 "AKM print completed 80%" elif {job.filePosition}/{job.file.size}>=.89 & {job.filePosition}/{job.file.size}<=.91 M117 "AKM print completed 90%" elif {job.filePosition}/{job.file.size}>=.99 & {job.filePosition}/{job.file.size}<=1.01 M117 "AKM print completed 100%"