# Math add to a buffer number

**URL:** <https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490>\
**Category:** General\
**Created:** [8 August 2021 18:52 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490 "2021-08-08T18:52:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zamzon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zamzon/32/15521_2.png) [@zamzon](https://discourse.nodered.org/u/zamzon)\
**Post date:** [8 August 2021 18:52 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490/1 "2021-08-08T18:52:42Z")

</div>

I have this payload that I need to add with 1, but i cant get it working.  
Can someone help?

![Udklip](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/d/5d3fdb78672fe480ba571d559eaf4cb2113b5b7d.jpeg)

```auto
var askno = msg.dynet[5] ;

msg.askno = askno ;

msg.askno1 = askno + 1;

return msg;

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [8 August 2021 19:03 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490/2 "2021-08-08T19:03:56Z")

</div>

That looks fine, with the limited look at your debug it is hard to say what's occurring . Is the debug set to show the complete message output

works for me.

 ![Screenshot_20210808-200306](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/7/57434f94e269eadad0fc85578808fd33e218619c.png)

---

<div class="post-metadata">

**Author:** ![gerry](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/gerry/32/21604_2.png) [@gerry](https://discourse.nodered.org/u/gerry)\
**Post date:** [8 August 2021 19:22 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490/3 "2021-08-08T19:22:33Z")

</div>

When you say it isn't working...... what are you getting and what are you expecting? What does a debug on the output show?

---

<div class="post-metadata">

**Author:** ![zamzon](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zamzon/32/15521_2.png) [@zamzon](https://discourse.nodered.org/u/zamzon)\
**Post date:** [8 August 2021 19:35 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490/4 "2021-08-08T19:35:58Z")

</div>

Really sorry, I my received buffer did send the wrong number, the code was correct

Thansk for your response

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 October 2021 19:36 UTC](https://discourse.nodered.org/t/math-add-to-a-buffer-number/49490/5 "2021-10-07T19:36:54Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
