The doc says:
“This function [addMarker] returns an identification number for the marker added, or nil if there was a failure.”
So, can this id number be 0? It does sound slightly un-LUA-ish.
I get 0 sometimes. As it is not nil, it is not marked as a failure, but in these cases I do not get a visible marker on my map so something seems to be wrong.