12-09-2025 11:36 AM
We want to create a Mahjong Game with online connection feature but we try to use UDP and always get error on unflatten string. We test it out and always find out it UDP read returns a empty string that causes this error. so we think it is something about UDP code that causes this mistake. But we don't know how to fix this. Please help us. Thanks.
Github repo : https://github.com/gisgisgisgisgis/Mahjong
The problem is on Menu.vi
we want to sync the user count for every player.
Below is the part of sending JOIN request
This part is about handle player count
Error:
Solved! Go to Solution.
12-09-2025 12:19 PM - edited 12-09-2025 12:25 PM
Many here don't have LabVIEW 2025 and thus cannot look at your code. (Feel free to down-convert the project to e.g. LabVIEW 2019 and attach it here)
What is the datatype of the diagram constant that you wired to the top of the unflatten operation (Cannot tell from the picture!)
Side note, unrelated to your error:
You can probably eliminate 50% of your "read global" and eliminate the sequence structures. Right?
12-09-2025 12:48 PM
Thanks for your reply.
It's a u32 integer, and you're right, I can definitely remove it. I'll change that later.
As for the older version, here it is. Because the whole project is too large that I only can upload serveral vi files. These files I think it's all about Menu.vi and the error, and If I miss something that is needed.
Please tell me to upload again.
12-09-2025 12:54 PM
Can you place an indicator at the string response to be flattened? What's in it?
12-09-2025 01:07 PM - edited 12-09-2025 01:08 PM
it's empty. So I assume that I write something wrong in UDP connection part.
12-10-2025 04:13 AM - edited 12-10-2025 04:16 AM
It's empty because the UDP Read returns an error. But you do not show that error, it's just indicated by the letters "ER" in the tiny blue box on the UDP Read error out. Most likely it is error 56, timout!
Your Flatten from string should go into the No Error case of that case structure.
12-10-2025 05:00 AM
Thank you. After I put it into the No Error case, it immediately fixed the problem.