How do I transfer global variable on another screen to a different screen? TinyWebDB?

Here is my NameEntryScreen

NameEntry Blocks

and i want to reuse it back in GameScreen so i can say

  1. "theirname's Turn" ; this might not be necessary as for now i just use Player 1's Turn/Player 2's Turn
  2. use it for my leaderboard saying "alex - 6 points" etc (IMPORTANT) i just want to include the name in the leaderboard database

but the thing is

i cant find the global variable ; cause i think we cant access global variables on another screen so how can i implement this features??

No, you can't use the same global variable on two different screens. Why even use player1 or player2 variables? In the when StartButton click block you could just update the TinyWebDB1 tags to P1.Text and P2.Text directly. No need for the middleman. And then in the when TinyWebDB1 gotvalue block, are you trying to set p1 and p2 variables to the value of TinyWebDB? If so, then there's no need, unless you are using those variables in some other part of you app, in which case those instances could be replaced with TinyWebDB1's tags and values. From what I've gathered, you have two screens (NameEntry and GameScreen) so you could call TinyWebDB1's values in gamescreen, where ever you used getP1name or getP2name. I'm pretty new at MIT appinventor so if I got something wrong then sorry.

You should use TinyDB, not TinyWebDb. TinyDB data stays on the device and will be much faster than TinyWebDB. It will also work when you are offline. Also, unless you host your own TinyWebDB instance, anyone can access the data you put into TinyWebDB.

if i use tinydb will the leaderboard be accessible to everyone across different devices?

like this?

No
In this case you need an online database

Taifun