Scripting/Server/Classes/HashTable/Inc

Add or subtract 1 from an integer value (missing keys start at 0).

Syntax

ht.Inc(key)
ht.Dec(key)

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "inc" )
	{
		// ht is a ht handle (see HashTable)
		ht.Inc( "X" );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: HashTable

Categories: Server methods | HashTable