tmntppn's Recent Forum Activity

  • Hi rex, I've come across something that I'm not sure whether it's a bug or it's intended to be.

    • If I set a value (with send-set) into, lets say a tickcount, I received one callback as I think it should.
    • But if I set server timestamp, I received two callbacks, both with different Firebase.LastData value.

    Is this a bug?

  • rexrainbow

    Hi, I've just started using your plugins and I need help with some of the basic, of probably some suggestion of the best practice using firebase. Lets say I have firebase db like this:

    "queue":
    	- "queue_a":
    		- "1":
    			- "pax":2
    			- "status":"CALLED"
    		- "2":
    			- "pax":1
    			- "status":"WAITING"
    	- "queue_b":
    		- "1"
    			- "pax":4
    			- "status":"WAITING"
    		- "2"
    			- "pax":4,
    			- "status":"WAITING"
    "other_key":...
    [/code:3bzwuc16]
    
    How can I get the count of groups waiting in each queue_a and queue_b?
    
    So far, I've tried using your itemtable plugins: I load all items at the start of layout and display result with ItemTable.Count, but I only get the count result of the root domain. How can I get the count of subdomain? Do I need to set domain to each specific subdomain, get count, and set to another subdomain, get count again? Or in related with construct 2, is it probably better if I load all items then store it in local JSON plugin (I'm using Yann's JSON plugin) and count it from there?
    
    I hope my question is clear enough. Thank in advanced.
  • Yann

    Great plugins tho. I've been using it in some of my projects and it helps a lot, so thx for the plugins.

    Feature suggestion: Find indexof("value"). Is it possible to add a feature to find index in an array? Similar to indexof expression in Array object. What I'm doing now is loop through each element and compare its value one by one. Indexof will make a shorter line of code.

  • So I create a fix for myself. Now it is able to delete an element of an array.

    Say we have JSON like this:

    {"models":[{"id":1,"type":"Type 0"},{"id":2,"type":"Type 1"}]}[/code:1ip9crp5]
    Previously, if I set action:
    [code:1ip9crp5]delete root@"models", 0[/code:1ip9crp5]
    The result will be like this: (Note that the first element becomes [i]null[/i].)
    [code:1ip9crp5]{"models":[null,{"id":2,"type":"Type 1"}]}[/code:1ip9crp5]
    
    So I change the runtime.js at line 405, from this:
    [code:1ip9crp5]function deleteIfValid(obj,prop) {
    	if ( obj !== undefined && obj !== null && 
    		(typeof obj === "object") && obj[prop] !== undefined){
                    
    		delete obj[prop];
    	} else {
    		log("invalid path: root@"+ path_.toString(),"warn");
    	}
    }[/code:1ip9crp5]
    Into this:
    [code:1ip9crp5]function deleteIfValid(obj,prop) {
    
    	if ( obj !== undefined && obj !== null && obj[prop] !== undefined ) {
    
    		if( Object.prototype.toString.call( obj ) === '[object Array]' ) {				// If object is an element of an array
    			obj.splice(prop,1);															// delete element at index prop
    		} else if( Object.prototype.toString.call( obj ) === '[object Object]' ) {		// If object is an object
    			delete obj[prop];
    		}
    
    	} else {
    		log("invalid path: root@"+ path_.toString(),"warn");
    	}
    }[/code:1ip9crp5]
  • Hi,

    Is it possible to delete an element of an array? Currently, what I've tried so far is that I can delete an element of an object, but not array. When I use "delete" action and set the keys into an array, it just emptied the array, making it null. What matter is when I try to get the size (eg: JSON.Size(0, "data"), the null elements are counted as well. Can I delete the element entirely so it wont be counted? Or am I doing it wrong?

    Regards,

    Alvin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I bumped on this very same problem about layer visibility just 2 days ago and I can say that I'm also disappointed that this doesn't even mentioned in the manual.

    I spend whole yesterday trying to figure out what was I doing wrong. Tried with different settings, different methods, I read manuals about layers, system action/expression, etc. all with same result. Jeez, it even cross my mind to rewrite everything because I wasn't sure if the bug was coming from corrupted save file. That would have set me back a week worth of works. This should have been mentioned in the manual.

  • I'm having the same problem here (r221). So is there a workaround for this to make the newline visible in the basic notepad? I'm asking because at this moment, I still need the output file to be opened with basic notepad.

  • Hi septeven, sorry for reviving an old thread. I wonder if you have update for the font properties? Particularly the font type, size, and line spacing. Also, is it possible to change size of the circle/square?

  • Hi, I've just purchased your plugin through paypal. Please confirm and send me the plugin? Thanks.

    PS: The email address is: j39drxxxx gmail . com (same as paypal).

  • Ribis

    You can edit the runtime.js line 99 to:

    acts.SetCookie(name,"",-1);

tmntppn's avatar

tmntppn

Member since 23 Mar, 2015

None one is following tmntppn yet!

Trophy Case

  • 9-Year Club
  • Email Verified

Progress

10/44
How to earn trophies