Hi, I'm trying to do the Hearthstone tutorial and I'm a bit confused about the processRank module. What exactly is a module and where does this code go?
Sorry if this is an obvious question, I'm just getting started with Gamesparks.
Thanks!
Best Answer
S
Strider Agostinelli
said
over 5 years ago
Under Cloud Code there is a folder in the scripts sidebar called Modules. Click the + sign next to the folder to create a new Module.
When you want to load a module in a different script you can use either:
Require("name of module")
RequireOnce("name of module")
Keep in mind that you are continuing execution within the module. It's not self contained. Meaning that if you had var animal = "Cat"; in the parent script, that exists and can be altered inside of the module.
1 Comment
S
Strider Agostinelli
said
over 5 years ago
Answer
Under Cloud Code there is a folder in the scripts sidebar called Modules. Click the + sign next to the folder to create a new Module.
When you want to load a module in a different script you can use either:
Require("name of module")
RequireOnce("name of module")
Keep in mind that you are continuing execution within the module. It's not self contained. Meaning that if you had var animal = "Cat"; in the parent script, that exists and can be altered inside of the module.
Moshe Rosenschein
Hi, I'm trying to do the Hearthstone tutorial and I'm a bit confused about the processRank module. What exactly is a module and where does this code go?
Sorry if this is an obvious question, I'm just getting started with Gamesparks.
Thanks!
Under Cloud Code there is a folder in the scripts sidebar called Modules. Click the + sign next to the folder to create a new Module.
When you want to load a module in a different script you can use either:
Require("name of module")
RequireOnce("name of module")
Keep in mind that you are continuing execution within the module. It's not self contained. Meaning that if you had var animal = "Cat"; in the parent script, that exists and can be altered inside of the module.
Strider Agostinelli
Under Cloud Code there is a folder in the scripts sidebar called Modules. Click the + sign next to the folder to create a new Module.
When you want to load a module in a different script you can use either:
Require("name of module")
RequireOnce("name of module")
Keep in mind that you are continuing execution within the module. It's not self contained. Meaning that if you had var animal = "Cat"; in the parent script, that exists and can be altered inside of the module.
2 people like this
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics