Garry's Mod Wiki


  number Panel:GetCookieNumber( string cookieName, number default )


Gets the value of a cookie stored by the panel object, as a number. This can also be done with cookie.GetNumber, 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.


1 string cookieName
The name of the cookie from which to retrieve the value.
2 number default
The default value to return if the cookie does not exist.


1 number
The number value of the stored cookie, or the default value should the cookie not exist.