lukeo25's Recent Forum Activity

  • F&N Brilliant!

    Thanks sizcoz

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks but I still don't see how I am getting the index of where C2 finds the string in the array

  • I take it that the string can't be a part of the string.

  • Thanks dop2000

    I've seen that elsewhere.

    What does that look like in the Event sheet?

    Cheers

    Luke

  • Hi,

    I am storing user data in an array and I am separating each entry with a "|||" separator. I can load these fine but I have given each individual an id number that they enter on another website. The data gets pulled down using an ajax request URL - this all works fine. What I want to do is search through the array and find the occurrence of the users id number in that array and then get the index of that occurrence so as to only load that persons data.

    So the question is how do I find the index of an occurrence of string in an array?

    Luke

  • If you want to test your app, use the Debug APK option. - OK I will try this first

    Thanks Dude

  • So I just recently purchased C3 as an indy. My reason was because I wanted to create android apps. I have been having failed install after failed install. SO I wondered if it was the way I built my app in the first place. It was originally a construct 2 build. I decided to open one of the template projects and export it to android without making any changes. I sideloaded it to my android device after C3 export and......It shows as "CORRUPT".

    What gives? C3 claims it can do this...I am really pissed.

    Luke

  • OK yes I do have this in the edittime.js

    "dependency": "SCORM_API_wrapper.js",

    Should I put in all variables from this also?

  • Hey blackhornet,

    Does this go into the runtime or edittime?

  • Hi,

    I'm sure this must have been covered at some stage . I just can't seem to find the right tutorial/forum post.

    I have an external js file that is in my plugins folder. I am trying to call to a function in it using this in an expression.

    var learnername = (scorm.get("cmi.core.student_name"));

    But I just get an error saying scorm.get is not a function. Yet I know that it is a function of my external.js file.

    Any ideas?

    Cheers

    Luke

  • Its OK,

    I realized that my errors are caused by my external .js not being hosted on a moodle.

    Thanks for replying.

    Luke

  • This is hard to understand. I made the following change.

    This was the change to the edittime.js

    // example

    AddStringParam("Message", "Enter a string to alert.");

    AddAction(0, af_none, "Alert", "PipeCalls", "Alert {0}", "Description for my action!", "Pipecall_Alert");

    AddAction(1, af_none, "Initialize", "PipeCalls", "Initialize", "Description for my action!", "Initial");

    AddAction(2, af_none, "Terminate", "PipeCalls", "Terminate", "Description for my action!", "Finish");

    AddComboParamOption("student_id");

    AddComboParamOption("student_name");

    AddComboParamOption("lesson_location");

    AddComboParamOption("credit");

    AddComboParamOption("lesson_status");

    AddComboParamOption("entry");

    AddComboParamOption("total_time");

    AddComboParamOption("lesson_mode");

    AddComboParamOption("exit");

    AddComboParamOption("session_time");

    AddComboParamOption("RO");

    AddComboParam("Parameter to get", "Parameter", "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}");

    AddAction(3, af_none, "GetValue", "PipeCalls", "GetValue {0}", "Description for my action!", "GeT");

    // (student_id, student_name, lesson_location, credit, lesson_status, entry, score, total_time, lesson_mode, exit, session_time, RO)

    AddComboParamOption("student_id");

    AddComboParamOption("student_name");

    AddComboParamOption("lesson_location");

    AddComboParamOption("credit");

    AddComboParamOption("lesson_status");

    AddComboParamOption("entry");

    AddComboParamOption("total_time");

    AddComboParamOption("lesson_mode");

    AddComboParamOption("exit");

    AddComboParamOption("session_time");

    AddComboParamOption("RO");

    AddComboParam("Parameter to set", "Parameter", "{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}");

    AddStringParam("Set it to what", "value");

    AddAction(4, af_none, "SetValue", "PipeCalls", "SetValue {0},{1}", "Description for my action!", "SeT");

    AddAction(5, af_none, "Save", "PipeCalls", "Save", "Description for my action!", "Save");

    AddAction(6, af_none, "Get Last Error", "PipeCalls", "Get Last Error {0}", "Description for my action!", "GeT_Error");

    AddAction(7, af_none, "Get an error string", "PipeCalls", "Get a SCORM error as a string {0}", "Description for my action!", "GeTError_Str");

    AddAction(8, af_none, "Get Diagnostic", "PipeCalls", "Get Diagnostic {0}", "Description for my action!", "GeT_Diog");

    ////////////////////////////////////////

    And this is the change in the runtime.js

    // ... other actions here ...

    Acts.prototype.GeT = function (pos)

    {

    // alert the message

    if(pos==2){ alert("you selected lesson_location");}

    };

    Any help appreciated.

    Cheers

    Luke

lukeo25's avatar

lukeo25

Member since 4 Dec, 2012

None one is following lukeo25 yet!

Trophy Case

  • 11-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

13/44
How to earn trophies