Guess The Word App hint button problem

Hello everyone, I am working on a word guess game. But there is something wrong with my code which I cant figure it out. I need your ideas about how to solve this problem. The problem is hint button. When user wants a hint user gets a letter. For first one it is ok , for the second it is also okay but then the program stop giving letters till user press hint button third times.Then for the last one it is same again. I do not know what causes this problem. Thank you for your help.
Here is my code;


Here is video of my program;

Hello TheHykrr

Well, your code is doing some pretty strange things that actually do nothing :upside_down_face:

  1. The root of the issue is using random integer between 1 and 4 on every button click - that result could be the same over and over (1 in 4 chance), so your code needs to reject numbers that were previously assigned.
  2. global index = kelimealma You do not need both variables. If the global is used elsewhere, just use that.
  3. I don’t know what the global list dizi is for, but in the button click event it looks like you want to overwrite it? If that is necessary, fine, but don’t leave open blocks and expect safe execution of the code…
1 Like

For example:

1 Like

Thank you for your answer, but the thing is there will be 4-letter word 5-letter words 6-letter words… I mean many… So I have to split the words to letter. This is very crucial. I cant combine both codes together. Here is what I am intend to do. Website of the game but in Turkish. I dont know it is forbidden to share this but : http://harflutfen.com/index.php

If you study my code carefully, you can see it can be adapted to any number of words of any length.

1 Like

Yes it is true but words have to be chosen randomly. So I have to split to words to letter. But I dont know how to adapt this to your code. Thank your for your patience. I really need help it really bothers me…

For what it’s worth, here’s a doc on my version of word guess, with unlimited length.
Sorry, no hints.