"exists" function help
-
Hey all, I can't get the "exists" function working to check for a macro parameter. Since it was in the list of functions in the meta commands page I expect that it is used like so:
if exists(param.C) = true echo param.C else M118 P0 S"No C parameter"
But the above script gives me this error:
Error: Failed to read code from macro grab_slotx.g: Failed to evaluate "exists(param.C) = true": expected an identifier
Am I doing this right? All the documentation I could find was that the "exists" function is now implemented.
Thanks,
T -
@tristanryerparke
Try justif exists(param.C) echo param.C else M118 P0 S"No C parameter"
-
@owend tried cutting and pasting your code, still got the same error. Maybe its not avaliable on SBC yet?
T -
@tristanryerparke which firmware version are you running?
-
@dc42 Sorry, should have mentioned in the original post, 3.3rc1 with DSF 3.3rc1.
-
@tristanryerparke there is a problem passing macro parameters from DSF to RRF in 3.3RC1. Try the RRF 3.3RC1+1 files at https://www.dropbox.com/sh/dlb58vkmu1u4fkx/AAAelkXSfRKVwI6_yqRnhGHPa?dl=0, or the RRF 3.3RC1+2 files at https://www.dropbox.com/sh/urr3rbnawf9ehcq/AAA_frdT0tcOXVlPUz3bHKU8a?dl=0.
I have tested an example similar to yours using the 3.3RC1+2 files in standalone mode. If you still can't get it working in SBC mode using these files then I will ask @chrishamm to take a look.