Greasy Fork is available in English.

Neverwinter gateway - Profession Automation

Automatically selects professions for empty slots

< Rückmeldungen aufNeverwinter gateway - Profession Automation

Frage/Kommentar

§
Veröffentlicht: 30.03.2015

Undefined....length.... again......

I think I have that undefined "length" error nailed down to a fault the can be replicated..... lets say your alchemy is level 12 - create a new alchemy profile but only specify levels 1,7,14 and 20 as the level profiles.... the "undefined length" error will happen all the time when it tries to select a task - so whether this is different from the random bug or something similar - not sure - since reloading the gateway fixes the issue - but may be in some way related and a pointer as to what is going wrong when the random script fails.... maybe the profession level array gets corrupted in memory?

Rotten_mindVerfasser
§
Veröffentlicht: 31.03.2015
I think I have that undefined "length" error nailed down to a fault the can be replicated..... lets say your alchemy is level 12 - create a new alchemy profile but only specify levels 1,7,14 and 20 as the level profiles.... the "undefined length" error will happen all the time when it tries to select a task - so whether this is different from the random bug or something similar - not sure - since reloading the gateway fixes the issue - but may be in some way related and a pointer as to what is going wrong when the random script fails.... maybe the profession level array gets corrupted in memory?

Never tried that way, there was some problems in Alchemy... but never replicated them.

Reloading "data object" if error is better than "restart", but currently it seems that problems are on host side... gateway is really buggy now.

Random failures can be caused by Gateway-Tampermonkey , script gives proper order but they are not executed or output is corrupted...

, extra error handling/data object check/reload only deeded data and if fail then "page reload", must be solution you seek @Dazzlingdaz , right? ;)

Rotten_mindVerfasser
§
Veröffentlicht: 31.03.2015

Did I catch same error, just testing RU -gateway and saw this few times.

  Uncaught TypeError: Cannot read property 'length' of undefinedVM7022:1254 createNextTaskVM7022:1129 (anonymous function)VM7006:20 d.(anonymous function)

    // Check level
    var level = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function (entry) {
        return entry.name == prof.taskName;
    })[0].currentrank;
    var list = prof.level[level];
    if (list.length <= i) {
        console.log("Nothing Found");
        switchChar();
        return false;
    }
    console.log(prof.taskName, "is level", level);
    console.log("createNextTask", list.length, i);

    var taskName = list[i];
    console.log("Searching for task:", taskName);
§
Veröffentlicht: 31.03.2015

That's what makes me think it's a corrupt block of data being sent from the server and stored badly in local array - then the test on the length of the array fails and we see the problem - the solution of reloading the gateway "fixes" the problem by redownloading and resetting the script - I am wondering if instead of a gateway reload, we just reload the current page with something like:

location.reload(); 
Rotten_mindVerfasser
§
Veröffentlicht: 31.03.2015

...so include error check and if check fails it try first refresh data(how?) and then do "pagereload", that will be better method, yes!!!

// Check level
var level = unsafeWindow.client.dataModel.model.ent.main.itemassignmentcategories.categories.filter(function (entry) {
    return entry.name == prof.taskName;
})[0].currentrank; // do check for this and if error reload it(how?)

Antwort schreiben

Anmelden um eine Antwort zu senden.