Android keyboard_string on Android doesn't work

N

ndaoud360

Guest
OK, I have a game where you type in a number using keyboard on pc or virtual keyboard on Android. I also have a button that erases the number. It erases it fine using pc but android it won't erase the number.

This code is supposed to make the string (number) that I input back to nothing. Like I mentioned it works on pc fine but Android no.
Code:
keyboard_virtual_hide();
keyboard_string = ""
And this code initiates the keyboard for input
Code:
if (string_length(keyboard_string)<limit)
    global.score_P1_R1 = keyboard_string;
else
    keyboard_string = global.score_P1_R1
}
 

Gzebra

Member
OK, I have a game where you type in a number using keyboard on pc or virtual keyboard on Android. I also have a button that erases the number. It erases it fine using pc but android it won't erase the number.

This code is supposed to make the string (number) that I input back to nothing. Like I mentioned it works on pc fine but Android no.
Code:
keyboard_virtual_hide();
keyboard_string = ""
And this code initiates the keyboard for input
Code:
if (string_length(keyboard_string)<limit)
    global.score_P1_R1 = keyboard_string;
else
    keyboard_string = global.score_P1_R1
}
Is limit less than string_length(keyboard_string)?
 

rIKmAN

Member
OK, I have a game where you type in a number using keyboard on pc or virtual keyboard on Android. I also have a button that erases the number. It erases it fine using pc but android it won't erase the number.

This code is supposed to make the string (number) that I input back to nothing. Like I mentioned it works on pc fine but Android no.
Code:
keyboard_virtual_hide();
keyboard_string = ""
And this code initiates the keyboard for input
Code:
if (string_length(keyboard_string)<limit)
    global.score_P1_R1 = keyboard_string;
else
    keyboard_string = global.score_P1_R1
}
What version of GMS are you using?

This was a bug that was fixed a while ago in GMS2, so make sure you are using the latest version.
 
Top