📓
Mysql for Game Creator 1
  • Mysq for GC1 Documentation
  • Mysql for Game Creator
    • Getting started
    • Setup and usage
      • Mysql Actions
        • Action Use WebGl
        • Action Mysql Connect
        • Action Mysql Close Connection
        • Action Mysql Insert
        • Action Mysql Update
        • Action Mysql Select
        • Action Mysql Delete
        • Action Mysql Clear Table
        • Action Mysql Select To UI
        • Action Mysql Query
      • Other Actions
        • Action Text to Variable
        • Action Encrypt and Decrypt data
        • Action Generate random string
        • Action Check Internet Connection
        • Action Base64 Image to UI Image
      • Condition If Connected To Internet
      • "Life Hacks"
        • Update +1
        • WebGL Action
        • Working with Variables
    • FAQ
    • Roadmap
Powered by GitBook
On this page

Was this helpful?

  1. Mysql for Game Creator
  2. Setup and usage
  3. "Life Hacks"

Working with Variables

PreviousWebGL ActionNextFAQ

Last updated 4 years ago

Was this helpful?

This module uses StringProperty almost in every SELECT, INSERT OR UPDATE statements.

But what to do if we need to update INT column in Mysql with Number Variable? It is not convenient to store Numbers in Strings... So I decided to make some universal way to work with Variables with Mysql for Game Creator module.

Syntax:

Global Variables: {Global:[VariableName]} Local Variables: {Local:[VariableObject]:[VariableName]}

How to use:

For example you want to update score column in Mysql Database with some Local Number Variable. For example, you have LocalVariable object on your scene, it has Variable "score" with value 10. Also you have Global Variable "playerName".

This example shows how to use this syntax.

(Set clause) In Column1 section - Equal value, you must write {Local:LocalVariable:score}

Local - will define Variable type to use LocalVariable - the name of Variables game object in your scene score - name of your Variable in LocalVariable game object.

(Where clause) In Column 2 section Equal value is: {Global:playerName}

Global - will define the type of Variable to use playerName - name of the Variable

This will successfully update score of playerName that stored in GlobalVariable with 10