Dear All
I am trying to see if it is possible to pass values of DeviceId and UID to a filewrite function.
eg: filewrite(pncFile,"ServerPath=/mccdata/'%DeviceID%'/'%UID%'");
John
filewrite(pncFile
Re: filewrite(pncFile
Try removing the ' around them:
filewrite(pncFile,"ServerPath=/mccdata/%DeviceID%/%UID%");
filewrite(pncFile,"ServerPath=/mccdata/%DeviceID%/%UID%");
Re: filewrite(pncFile
Dear Josh
After removing ' . I am getting below warnings
WARNING: Number of '%' arguments passed (0) does not match the number expected in the message text (1).
WARNING: Number of '%' arguments passed (0) does not match the number expected in the message text (1).
After removing ' . I am getting below warnings
WARNING: Number of '%' arguments passed (0) does not match the number expected in the message text (1).
WARNING: Number of '%' arguments passed (0) does not match the number expected in the message text (1).
Re: filewrite(pncFile
Sorry. I forgot that it would try to interpret the '%D' in '%DeviceId' as if it was %d and it is looking for a replacement. Try the following instead:
filewrite(pncFile, "ServerPath=/mccdata/%s/%UID%", "%DeviceID%");
or
filewrite(pncFile, "ServerPath=/mccdata/%s/%UID%", getdeviceid());
filewrite(pncFile, "ServerPath=/mccdata/%s/%UID%", "%DeviceID%");
or
filewrite(pncFile, "ServerPath=/mccdata/%s/%UID%", getdeviceid());