Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia

Returns the script name and line number where the region was created.

location = ScriptRegion:GetSourceLocation()

Returns[]

location
string - The script name and line number where the region was created.

Details[]

  • The returned string will be the script name and line number delimited with a colon, eg. path\to\script.lua:10.
  • For accurate script names the enableSourceLocationLookup console variable must be set to 1, otherwise the script name will always be "UnknownFile".
  • For dynamically loaded scripts the script name portion will correspond to the chunkname argument supplied to loadstring. If not supplied, this will typically expand to a leading portion of the script body.
  • Texture and fontstring regions created through script APIs at-present report the source location of their initial parent frame, whereas those created statically in XML will be correct.

Patch changes[]

Shadowlands Patch 9.2.5 (2022-05-31): Added.