on an even brighter note, mccam starts without trouble after a header was added....not very functional though, but i'll work on that.
One problem you may encounter is errors along the lines of "msg from unexpected script id". You may also get errors sending messages.
Each script started by chdkptp is given a unique ID, and messages are identified by which script generated them or expected to receive them. Various parts of the chdkptp code check that IDs match, because
usually, seeing messages generated by a script other than the most recently started one is a sign of a problem.
Scripts started by on the camera (though the menu or using autostart) do not update the ID. For a script started with autostart, the ID will be zero, which is not a valid ID in the chdkptp code.
While it's possible to write chdkptp code that doesn't care about the script ID, the multicam code uses function that does, and I don't see a really straightforward way to work around it. The most straightforward would probably be to provide a way to set chdkptp's idea of the script ID to whatever is running on the camera, but this doesn't currently exist.
at the same time, getting something like 'download -nolua A/DCIM/100_0717/IMG_0001.JPG' work with getlastimg() and converted to work in multicam is still beyond me....or worse, it is already in there but i'm unable to see how or call it properly.
If you are running multicam, I'd suggest using mc:download_images. To download the most recent image, you could use
mc:download_images{lastimg=1}
lastimg=N is the number of images, starting from the current file counter value, so lastimg=5 should get the 5 most recent images. Not it's possible there are corner cases when the file counter wraps past 9999 or the folder changes.
Other filtering options are generally the same as what is available from the imdl CLI command. You can look at cli.lua to see how these map to options passed in the opts array to download_images.
Or if you want to get the paths and handling downloading yourself, you can use mc:imglist which takes the same options and returns table of file information indexed by camera id.