MZ - Script call "Bad Arguments" when using Cyclone Steam [Solved]

● ARCHIVED · READ-ONLY
Started by Vati 7 posts View original ↗
  1. I realised it would probably be better to ask my question here, instead of posting in a very old thread, so....

    I have been trying integrating Steam achievements in a MZ game with Cyclone Engine, and it seemingly works - I'm not getting any big error messages, and steam shows me as playing the game when I launch it. But overlay isn't working, and when I try to activate an achievement, I get this script call error. I haven't seen anyone else mention this in any of the threads, so I'm a bit desperate to find out what I might have done wrong!
    1.png

    My script call looks like this (The achievement name should be correct and matching the one in steamworks):
    2.png

    I'm not sure what "Bad arguments" mean, if it's a typo somewhere, or something else entirely?

    The cyclone engine plugin script is here, for reference:
    https://github.com/Hudell/cyclone-engine
    https://raw.githubusercontent.com/Hudell/cyclone-engine/master/plugins/Cyclone-Steam.js <- the plugin code itself
  2. "Bad arguments" usually means that your input inside the () is incorrect. E.g. something is missing, something is the wrong type, etc.

    I cannot see how this plugin is supposed to be called, maybe there's something missing.

    I wonder given it's an MZ plugin, can you use Plugin Commands? Usually, they are much easier to call.
  3. Sadly there are no plugin commands for this on, it would definitely have made things easier for programming dummies like me haha :')
  4. when checking the plugin, there is no document saying "CycloneSteam"
    on activateAchievement, either a static one and greenworks one:

    this.greenworks.activateAchievement(achievementId)

    but I dont know how it works, so it's hard to tell what you need to call,
    so you could try that one, else see if there is a documentary how to use it.
  5. Since the Makerdevs site is down, I mostly found out the script calls by looking at this guide for the OrangeWorks version (https://forums.rpgmakerweb.com/inde...-updated-nw-js-super-high-performance.132405/) and seeing what commands had worked for others (https://forums.rpgmakerweb.com/index.php?threads/steam-greenworks-plugin-for-mz.130019/#post-1139006)

    I think I even saw a list of them somewhere, but the information is so scattered that I'm not even sure where anymore, think I had a hundred tabs open when setting it up.
  6. What a mess. I guess you only get instructions for the plugin if you subscribe to the author.

    Looking at it, that function is called with an argument called achievementId - a name (text string) is usually not an ID.

    Is there anyplace where your achievements are assigned numeric IDs? It might be expecting that. Or you have a misspelling or something going on - if you weren't accessing the correct function at all, that's what error you'd be getting.
  7. A mess indeed! But thank goodness, I just got it working.

    So far I had been using instructions for using strict versions of NW.js, nodes and Steam SDK as was recommended for the everything to work together. But after looking at this newer blog post, I decided to try and go with the very newest versions of each instead. And now achievements activate as they should!

    Only problem I still have, is that the steam overlay still does not work, so there are no neat little pop-ups in the corner even though steam itself shows that an achievement has been unlocked. I have no idea how to fix this at the moment and it's a bit frustrating, but it's a start I guess.

    For others coming across this post in the future, the versions I used at this particular point in time were:
    NW.js: v0.71.0
    Nodes: v111
    Steam SDK: v1.55

    Thanks to those of you chiming in, it still helped to at least be able to zone in on what I wasn't doing wrong.