Sign In Register

How can we help you today?

Start a new topic

Common Functions

I can define a java script function in a cloud code. I cannot use this on other requests, responses cloud code. i know there is a concept as module but it has no interface, i have to use fixed variable names for both input and output. there should be a system like "include common.module" and it accepts java script functions in this module.


Thanks Jason, i thought require means execute. it includes code like you said it works.

You can use 

require("moduleName");

to import module code into other event code.


Check out the section about modules in the docs: https://docs.gamesparks.net/developer-portal/cloud-code

Login to post a comment