Panel/GetCookie

From Garry's Mod
Jump to: navigation, search
 Panel:GetCookie( )

Contents

Description

Gets the value of a cookie stored by the panel object. This can also be done with cookie.GetString, using the panel's cookie name, a fullstop, and then the actual name of the cookie.

Make sure the panel's cookie name has not changed since writing, or the cookie will not be accessible. This can be done with Panel:GetCookieName and Panel:SetCookieName.

Arguments

string cookieName

The name of the cookie from which to retrieve the value.

Arguments

string default

The default value to return if the cookie does not exist.

Returns

string

The value of the stored cookie, or the default value should the cookie not exist.
Personal tools
Navigation