EXport not recognised in editor

0 favourites
  • 3 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • im getting the module error for when i try to use export function on my js code.

    export function startup() {
     let text = "";
     
     // Add SYSTEM_values properties
     for (let i = 0; i < Object.keys(SYSTEM_values).length; i++) {
     const key = Object.keys(SYSTEM_values)[i];
     const value = Object.values(SYSTEM_values)[i];
     text += `\n ${key} : ${value}`;
     }
     
     // Add GAME_SETUP properties
     for (let i = 0; i < Object.keys(GAME_SETUP).length; i++) {
     const key = Object.keys(GAME_SETUP)[i];
     const value = Object.values(GAME_SETUP)[i];
     text += `\n ${key} : ${value}`;
     }
     
     console.log(text);
     return text;
    }

    i have tried as many of teh js tutorials i could find for the export function including the ad numbers things however when put into practice this is not working

    Tagged:

  • i am doing a simple

    localVars.Variable1 = startup()
    

    and not getting any return from it with and without the export function (the export function gives me a module error)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • this has been fixed, i was confused by the different ways js files are presented

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)