Where is Business_Tycoon?
Oh I thought you just added this to look nicer or something, ill fix it one sec.
It works perfectly now, thank you. Just one last question, see if I put my nick as niu and then somebody else puts it as niu, is it possible to make it so that you cant have the same nick and there would just be a label showing for few sec saying this nick is taken?
Yes, you are calling down the data for all the users
{"User0":"timai2","User1":"nui".....}
you can therefore test the value in the textbox against the values in the list
How can I test the value in the text box against the values on the list?
Going back to my first example:
Try blocks like this:
Note that the usernames come back with an extra set of double quotes....
If you have sublists inside each User (name/age etc.) then you will need to iterate over each of the lists.
Alternatively you could save a separate node full of just users names to test against.
Learn about using lists:
- Lists by Sajal Dutta
- Lists appinventor.org
There is a bit more work for me to do.
How many users in total do you think you will have? 80 ? 180? 1800 ?
It's just a test game really for my family and friends so I don't think it will be more than 10 but I thought you can just make it so it goes infinite in some easy way. And I want this data so that people can trade, and I made a thing so that when you type players nick it then shows this person a lavel saying new trade from and the person who sent it. idk if it will be broke now since you showed me a way better way of how to do it
I'll work on up to 99 users for now
Okay, thank you.
You are going to need an extension in order to sort the list coming back from Firebase
ListUtils compliant link Thanks @Taifun and @RudraFromIndia on Kodular
The problems with the original example were that the use of dictionary blocks returned a JSON. JSON has its own special way of not necessarily sorting things:
Also because the Users 0-9 had no leading zero, when you get to User10, this then comes after User1
I have added a leading zero routine to handle numbers below 10, and the listUtils extnesion then sorts the JSON list, producing this in Firebase as you add users:
and here are the blocks
Thank you so much ill test it out now.
Thank you so much it works perfectly now 1 last question, is it necessary to put in "" and "" at the end or can it just be the nick?
You have a choice for the name test, either leave as it is, or use text a replacement block to remove the quotes
Okay, thanks. Now I want to add trading and my old method is broken, so which part of the code do I have to copy to that screen so that it would search the list for users and if it finds the user then it does something?
Dang, you guys have gotten complex... lol. I'm still lost.
- You want a list of the users ? (we have already done this)
- You want to select a User? (add the users to a list, then add that list to a listview)
- You then want to do something with that user? (after selecting, then what ?)
@TIMAI2
I need your help again, I can't pm you so I'm asking it here.
What am I doing wrong?
firebase:

Oops, sorry. It all was cause of a little spelling mistake.