gb.save.set

Description

// number:
bool gb.save.set( uint16_t block , int32_t number)
// buffer:
bool gb.save.set( uint16_t block , void* buffer , uint8_t buffersize)
bool gb.save.set( uint16_t block , [const] char* buffer)
// object:
bool gb.save.set( uint16_t block , T object )

gb.save.set will allow you to set something to the savefile. This function is slow! You specify the block you want to save to along with information as to what you want to save. It returns true on success.

  • Number You specify the number to save
  • Buffer You specify the buffer and buffer length to save, or you just specify a string pointer
  • Object You specify an arbitrary object

Parameters

  • uint16_t block: block to save to
  • for the others see above

Returns

bool: true on success

Example

#include <Gamebuino-Meta.h>

void setup() { gb.begin();

// set a number int32_t number = 42; gb.save.set(0, number);

// set a buffer char fox[] = "Fox"; gb.save.set(1, fox); }

void loop() {

}