DeleteSnapshot()

Summary

Removes a snapshot from a map and deletes its image file.

Syntax

DeleteSnapshot(string map_name, string snapshot_name)

Argument Contents
map_name Name of the map, or null for the current map
snapshot_name Name of the snapshot

Notes

  • If the named snapshot does not exist, DeleteSnapshot() does not signal an error.

Example

// Here's a loop to delete all the snapshots from a map
snaps = GetSnapshots() // gets snapshots for the current map
for i = 1 to snaps.length do DeleteSnapshot(null, snaps[i]) end

Error Codes

Error Type Meaning
NotFound The specified map does not exist

See Also

Function Summary
CreateSnapshot() Stores a snapshot image of the map as currently displayed
ShowSnapshot() Displays a snapshot and sets the map scope to match
ConstructSnapshot() Convert a customized image file into a map snapshot
GetSnapshot() Gets the scope and image file of a snapshot
GetSnapshots() Gets a list of all snapshots associated with a map