GHI_Save

Pilus edited this page Aug 11, 2015 · 1 revision
Clone this wiki locally

Syntax:

GHI_Save(index, var)

Arguments:

GHI_Save() has two required arguments. This API call is used to set a variable to be used by [GHI_Load]

index
''String''
This string is the name of a variable you wish to save. This variable is saved even after log out. So be very careful what you name your variables.
var
''Any''
Returns the data stored in the variable passed with "index".

Example:

local strRate = UnitStat("player", 1)

print("Strength: "..strRate)

GHI_Save("str",strRate)

This script gathers the player's strength rating, prints a sentence with it, and saves it for later use by [GHI_Load].