Es.keygroupload

From EventScripts Community Encyclopedia
This article is a stub. Please help by adding to it.



Method: keygroupload

Module: es
Class: (no class)
EventScripts version: 2.0

Method Overview

Table of Contents

Contents


Description

This is the Python equivalent of: http://www.eventscripts.com/pages/es_keygroupload

Arguments

  • Keygroup - Name of the keygroup you wish to load into memory.
  • [Location] - Location (relative to cfg/events/) of the file you wish to load.


Examples

Say you have make a file called es_mykeygroup_db.txt (Notice it must be prefixed with es_ and suffixed with _db and it must be a .txt file). We'll put that file in addons/eventscripts/scriptname/ and then let's just stuck some information in it:

"mykeygroup"
{
	"key1"
	{
		"keyvalue"		"value"
	}
}
es.keygroupload("mykeygroup", "|scriptname")

This will load that keygroup into memory so we can use it to retrieve keyvalues and add/delete keys, etc.

Notes

you can save it back to the memory like so

es.keygroupsave("mykeygroup", "|scriptname")

this will save mykeygroup to addons/eventscripts/scriptname as es_mykeygroup_db.txt

See Also

blog comments powered by Disqus