Garry's Mod Wiki

IRestore:StartBlock

  string IRestore:StartBlock()

Description

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

Returns

1 string
The name of the next data block to be read.

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