Whenever pressing the inject button, I have it to pre count function but whenever it delivers the last function where it adds all the other msgs the output just responds with NaN. Not sure what the problem is
[{"id":"d5827792b6feb906","type":"tab","label":"Flow 3","disabled":false,"info":"","env":[]},{"id":"a86549d83c959ac5","type":"debug","z":"d5827792b6feb906","name":"debug 40","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"total","targetType":"msg","statusVal":"","statusType":"auto","x":1100,"y":540,"wires":[]},{"id":"b13ff12fc6c33052","type":"function","z":"d5827792b6feb906","name":"function 41","func":"var count = context.get(\"count\") || 0;\ncount++\ncontext.set(\"count\", count)\nmsg.payload1 = count\n\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":480,"wires":[["cdd1555aed909682"]]},{"id":"cdd1555aed909682","type":"function","z":"d5827792b6feb906","name":"function 42","func":"var total = 0;\nvar v1 = msg.payload1 \nvar v2 = msg.payload2\nvar v3 = msg.payload3 \n\ntotal = v1 + v2 + v3\n\nmsg.total = total\nmsg.v1 = v1\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":870,"y":540,"wires":[["a86549d83c959ac5","3bc774f3ce283059"]]},{"id":"9b441a8442b9af40","type":"inject","z":"d5827792b6feb906","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":400,"y":540,"wires":[["b13ff12fc6c33052","4abba7795b3f68ee","9ddace5146e923eb"]]},{"id":"4abba7795b3f68ee","type":"function","z":"d5827792b6feb906","name":"function 43","func":"var count = context.get(\"count\") || 0;\ncount++\ncontext.set(\"count\", count)\nmsg.payload2 = count\n\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":540,"wires":[["cdd1555aed909682"]]},{"id":"9ddace5146e923eb","type":"function","z":"d5827792b6feb906","name":"function 44","func":"var count = context.get(\"count\") || 0;\ncount++\ncontext.set(\"count\", count)\nmsg.payload3 = count\n\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":600,"wires":[["cdd1555aed909682"]]},{"id":"3bc774f3ce283059","type":"debug","z":"d5827792b6feb906","name":"debug 42","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"v1","targetType":"msg","statusVal":"","statusType":"auto","x":1080,"y":440,"wires":[]}]