Create a new global variable
create_variableAdd a variable to a GB Studio project; ID auto-assigned, symbol derived from name (camelCase to snake_case).
Instructions
Append a new Variable entry to project/variables.gbsres. Id is auto-assigned as the next numeric string. Symbol is auto-derived from name (camelCase → snake_case, e.g. 'curQ' → 'cur_q'). GB Studio variables are 16-bit signed (-32768..32767); set initial value via set_variable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Display name. CamelCase maps to snake_case symbol. | |
| symbol | No | Override auto-generated snake_case symbol. |