Difference between revisions of "Gb.getDefaultName"
From Gamebuino Wiki
(Created page with "{{DISPLAYTITLE:gb.getDefaultName}} __NOTOC__ = Description = Gets the default user name set using the program SETTINGS.HEX. The default name is set in the Gamebuino's memory s...") |
(Changed title depth) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:gb.getDefaultName}} | {{DISPLAYTITLE:gb.getDefaultName}} | ||
__NOTOC__ | __NOTOC__ | ||
− | = Description = | + | == Description == |
Gets the default user name set using the program SETTINGS.HEX. The default name is set in the Gamebuino's memory so it's the same in every game. | Gets the default user name set using the program SETTINGS.HEX. The default name is set in the Gamebuino's memory so it's the same in every game. | ||
− | = Syntax = | + | == Syntax == |
<pre>gb.getDefaultName(name);</pre> | <pre>gb.getDefaultName(name);</pre> | ||
− | = Parameters = | + | == Parameters == |
* name (''char*''): a 10 char long string which will receive the default user name. | * name (''char*''): a 10 char long string which will receive the default user name. | ||
− | = Returns = | + | == Returns == |
none | none | ||
− | = Example = | + | == Example == |
<pre> | <pre> | ||
#include <SPI.h> | #include <SPI.h> | ||
Line 34: | Line 34: | ||
</pre> | </pre> | ||
− | = See also = | + | == See also == |
*[[bootloader]] | *[[bootloader]] | ||
*[http://arduino.cc/en/Reference/String string (Arduino reference)] | *[http://arduino.cc/en/Reference/String string (Arduino reference)] |
Revision as of 2014-05-18T09:58:18
Description
Gets the default user name set using the program SETTINGS.HEX. The default name is set in the Gamebuino's memory so it's the same in every game.
Syntax
gb.getDefaultName(name);
Parameters
- name (char*): a 10 char long string which will receive the default user name.
Returns
none
Example
#include <SPI.h> #include <Gamebuino.h> Gamebuino gb; char name[11]; void setup(){ gb.begin(); gb.getDefaultName(name); } void loop(){ if(gb.update()){ gb.display.print("Hello "); gb.display.print(name); } }