Jump to content

Implementing an API


Recommended Posts

Here are the instructions I received for implementing an API with GM: Studio.

 

 

 

For your information we have "lite" version of our API. In this case you have to add http://m.sgc.io/assets/api/voyager.js script to your game. Then to ask about language you can call window.SG_getLang() and to display ads you can call window.softgames.displayBanner(). You don't have to show ad when game is loaded, we are doing this in our script file.
 
Can anyone point me in the right direction here?  I just included the voyager.js file as an extension and called those particular functions but the banner ads still don't show up.  I'm getting this error in Chrome:
 
Uncaught TypeError: Cannot call method 'displayBanner' of undefined
 
I believe this means that window.softgames hasn't been set, but I'm pretty unsure.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...