# Variable value changed while storing it in firebase DB

**URL:** https://community.thunkable.com/t/variable-value-changed-while-storing-it-in-firebase-db/2517977
**Category:** Questions about Thunkable X
**Created:** [July 24, 2023, 12:43pm UTC](https://community.thunkable.com/t/variable-value-changed-while-storing-it-in-firebase-db/2517977 "2023-07-24T12:43:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ak\_coder](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ak_coder/32/156215_2.png) [@ak\_coder](https://community.thunkable.com/u/ak_coder)
#### Post date: [July 24, 2023, 12:43pm UTC](https://community.thunkable.com/t/variable-value-changed-while-storing-it-in-firebase-db/2517977/1 "2023-07-24T12:43:24Z")

</div>

Hello, thunkbale community, i am currently working on a multiplayer quiz game, where two users can play global quiz with each other.  
So, for doing this, i am storing their user IDS in an object `Waiting` in firebase, and then when there are 2 participants in the Waiting, i am collecting their IDS and making a unique match id of 8 chars using random chars, and then storing the match id as value of their user id in a new object `Players current match ID`  
I have two demo users now, one with user ID: `o9=>i!tk` and one with  
`{&,v<9;*`  
Now the problem is that, when i store their user IDS in players current match ID, the user id `o9=>i!tk` stores wrong ID, can u please help.

Some screenshots for more information about code and result

 ![Screenshot (1625)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cdaf27878cd3d8e66e2e0ee53f15992a4272220a.png)  
 ![Screenshot (1626)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/0/90700e7d3880067579c70929a0b132c27a3870bf.png)  
 ![Screenshot (1627)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/c/dc161d77ef2b24bd146baf8cea9cd32ec5caa34e.png)  
 ![Screenshot (1628)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/d/cd40cf75cdd6f927f674da8f44bee69033c73f54.png)

The Firebase result is like this:

 ![Screenshot (1630)](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/3/933c8f06599d8dec4aac31df3a396186d06d141f.png)  
The random match ID stored in `o9=>i!tk` is wrong and that of other is true,

Can anyone please tell why its happening?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [October 22, 2023, 12:44pm UTC](https://community.thunkable.com/t/variable-value-changed-while-storing-it-in-firebase-db/2517977/2 "2023-10-22T12:44:22Z")

</div>

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