mfdeveloper's Recent Forum Activity

  • I'm so sorry for my late response @Yann

    Many thnks , you are right! The action

    LoadJson[/code:6gqwu316] works correctly. I tried use [code:6gqwu316]SetValue[/code:6gqwu316] method because it is more clear for me.
    
    Ahhh I saw that you share this plugin on [b]github[/b], it is fuckying awesome. Thank you so much to share and accept new changes
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • rexrainbow, I understand now. So, if this is your purpose, Do you not should throw a specific exception? The javascript undefined error is generic for me. In my case, I inserted the initial value like a Dictionary with a empty key, and the same error happens. But, one different thing, is that I don't create the "On Start Layout" event, it is needed?

    Thank you so much for your attention!

  • Hello @Yann !!

    Your plugin is great and works like a charm for me! I'm using to configure and store a inventory mechanic rules!!

    However, I found a limitation: "The Set Value action not allow pass a JSON, only string or number". So, I implemented this change:

    from line 216

    if(/^\{*.*\}$/.test(value)){
       /** Parse JSON string here. This method needs a well formated json, like this:
       * {"name": "test", "age","xxx"}
       * So, you need pass a double quoted attributes and values. Otherwise, you will catch a
       */ parse exception on browser console log.
       value = JSON.parse(value);
    }
                          
    /** Additionally, add more elements instead override all values of the path, 
    * if the type of the last path is a array.
    */ 
    if(type(obj[path_[i]]) === "array"){ 
       obj[path_[i]].push(value);
    }else{
       obj[path_[i]] = value; // silently create a new property if doesn't exist yet
    }
    [/code:3c9sxq1s]
    
    How can I share this code snippet with you? Do you store the code of this plugin in some remote repository? (github, gitlab...) ? If yes, share with us to contribute with you
  • Hello @rexrainbow

    I'm using your plugin today, and I find a bug on instanceProto.add_value() method, line 62. The problem is that property this.current_object is undefined, and throw a javascript exception in a loop. This problem lock the browser and crash the game

    I solved this easily adding a if condition to check if this property is defined. Something like this:

     else if(this.current_object)
                this.current_object[k_] = v_;
     [/code:2mi4xek2]
    
    So, I have some questions to you:
    
    [ul]
    * How can I contribute with your plugins? Is the code in github/gitlab or similar remote repository?
    * How can I "push" or "send" this fix to you? 
    * Why do you not realize a merge with [b]json-v1.1[/b] into a only one plugin? 
    [/ul]
    
    Many thanks for your amazing job creating a wonderfull plugins and share free with us. You are a example to follow guy! I'm learning so much reading the code of your plugins
mfdeveloper's avatar

mfdeveloper

Member since 28 Apr, 2016

None one is following mfdeveloper yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies