MVCommons - The community core plugin

● ARCHIVED · READ-ONLY
Started by Zalerinian 83 posts Page 2 of 5 View original ↗
  1. i miss the ACE for pointing which scripts and line that throw error.

    i just encounter silly error which apparently only missing ;    >.< (yes... still new in JS) and it's really hard to find it.

    can someone add that feature in this plugin. it would be really helpful if we know which plugin crash the game and which line :D .

    just suggestion. (if i remember correctly in ACE there's script to backtrace the error... maybe someone could create something like that too?)
  2. estriole said:
    i miss the ACE for pointing which scripts and line that throw error.

    i just encounter silly error which apparently only missing ;    >.< (yes... still new in JS) and it's really hard to find it.

    can someone add that feature in this plugin. it would be really helpful if we know which plugin crash the game and which line :D .

    just suggestion. (if i remember correctly in ACE there's script to backtrace the error... maybe someone could create something like that too?)
    You can get that information by opening the developer console in your game. Simply press F8 in the game client, and it'll open up. It should default to the tab that displays error messages.
  3. I'm happy people are taking this core on board and utilizing its awesome features! :D
  4. Zalerinian said:
    You can get that information by opening the developer console in your game. Simply press F8 in the game client, and it'll open up. It should default to the tab that displays error messages.
    it's not clear enough >.<. but at least it's a start. thanks for info...
  5. estriole said:
    it's not clear enough >.<. but at least it's a start. thanks for info...
    Could you please explain what isn't clear enough? Is it the process to open the console, or the error messages themselves?
  6. Just a quick mention that line 449 has a comma rather than semi-colon. Look like this atm:

    function naturalBoolean(text) { if ( text.match(/(y(es)?)|true|on|active|enabled/gi) ) { return true, } return false; };Should be:

    function naturalBoolean(text) { if ( text.match(/(y(es)?)|true|on|active|enabled/gi) ) { return true; } return false; };Just in case anyone else see's this issue in their debugger.
  7. MechaGS said:
    Just a quick mention that line 449 has a comma rather than semi-colon. Look like this atm:

    function naturalBoolean(text) { if ( text.match(/(y(es)?)|true|on|active|enabled/gi) ) { return true, } return false; };Should be:

    function naturalBoolean(text) { if ( text.match(/(y(es)?)|true|on|active|enabled/gi) ) { return true; } return false; };Just in case anyone else see's this issue in their debugger.
    Fixed it, thanks :)
  8. Zalerinian said:
    Could you please explain what isn't clear enough? Is it the process to open the console, or the error messages themselves?
    the error message of course. :D . but maybe because i'm newb in JS.
  9. IMO the console is quite a lot of help - especially compared to ace's error stack checking capabilities :/

    Edit: I do prefer playtesting with the html file though, and using firefox console instead :)
  10. estriole said:
    the error message of course. :D . but maybe because i'm newb in JS.
    That is because javascript has many things different from other languages. SO they can't guess more.

    You still have a really good stack trace and things.

    That is why using "use strict"; in your code helps, it doesn't improve the stack trace, but it has more clear error messages, because things than are valid on vanilla javascript like getting an undefined property, are not valid on strict javascript:

    Code:
    var a = { x: 2 };a.y // Without strict a.y returns undefined, but continues, with strict throws the error "Undefined property y".
  11. Are you sure about that? When i execute this in Chrome's console i get undefined:

    Code:
    (function() {     "use strict";     var a = {x: 2};     alert(a.y); })();
  12. same on firefox
  13. Iavra said:
    Are you sure about that? When i execute this in Chrome's console i get undefined:

    (function() { "use strict"; var a = {x: 2}; alert(a.y); })();
    Hmm oh, it seems than only variables not defined are considered errors:

    (function() {  "use strict";  x = 2; // do this;})();That is kinda lame...
  14. No, the error in this case is, that you try to define x as a global variable, which isn't allowed in strict mode.

    /edit: If you change this line

    Code:
    x = a.y; // do this;
    to
    Code:
    var x = a.y; // do this;
    or have x defined previously, everything works fine and x gets set to undefined.
  15. As of version 1.1.0:

    •  Added MVC.naturalBoolean this will return true for many more values than just "true" (that includes on, enabled, yes and y). This will seems "more natural" on config parameters, so that is why it's called naturalBoolean.
    As of version 1.2.0:

    • added MVC.degToRad and MVC.radToDeg... so you can convert degrees to radians and vice versa (yes, people sometimes forget how to...)
    • Planning if we should do an MVCommons bugfix library than fixes bugs of the core classes.
    Why minor versions and not patch versions?

    The add functionality without breaking previous code, so you increment the minor number, fixing bugs is the only way one may add to the patch version.
  16. Ramiro said:
    Planning if we should do an MVCommons bugfix library than fixes bugs of the core classes.
    This would be nice!
  17. Would that mean down the road we have 1000 addons for just bug fixes? That would be a very bad idea. 
  18. Kane Hart said:
    Would that mean down the road we have 1000 addons for just bug fixes? That would be a very bad idea. 
    I thought it would be just a single plugin with fixes for all known bugs. And more importantly: nothing else than bugfixes.
  19. I know that this may sound obvious for some people, but for me it wasn't so I thought I share this information with you:

    If you download from Github you apperently have to click the "Raw" button if you want to download the file. In any other case there might be problems with the content of the .js file.

    I had this problems here and Zalerinian solved it for me, but if you could just add another instruction in the original post like "Press the Raw button to download and don't use right-click save or anything else" this will probably be helpful for some people :)