Garry's Mod Wiki

ISave:StartBlock

  ISave:StartBlock( string name )

Description

Starts a new block of data that you can write to inside current block. Blocks must be ended with ISave:EndBlock.

Arguments

1 string name
Name of the new block. Used for determining which block is which, returned by IRestore:StartBlock during game load.

Example

Example usage

saverestore.AddSaveHook( "HookNameHere", function( save ) save:StartBlock( "Test" ) save:WriteString( "myawesomestring" ) save:EndBlock() end )