Problem: maparg() does not indicate the type of script where it was defined. Solution: Add "scriptversion".