IRestore/StartBlock

From Garry's Mod
Jump to: navigation, search
 IRestore:StartBlock( )

Contents

Description

Loads next block of data to be read inside current block. Blocks must be ended with IRestore:EndBlock.

Returns

string

The name of the next data block to be read.

Examples

Example

Example usage.

saverestore.AddRestoreHook( "HookNameHere", function( save )
	local name = save:StartBlock()
	local myval = save:ReadString()
	save:EndBlock()

	print( name, myval )
end )

Output:

With example from ISave:StartBlock
Test myawesomestring
Personal tools
Navigation