is it possible to convert string value to real value like "123" to 123 i searched on google but cant find one the suit for my code here is the script i used for it
//Create Event
{
input_active = false;
input_limit = 6;
input_cursor[0] = "";
input_cursor[1] = "|";
global.caph=500
}//Any Key Event
{
if (input_active = true) {
if keyboard_check(vk_enter) { input_acive = false; }
if (input_limit > 0) && (string_length(keyboard_string) > input_limit) {
keyboard_string = string_copy(keyboard_string,1,input_limit)
}
global.caph = keyboard_string
}
}
//Global Left Button Event
{
active_instance = instance_position(mouse_x,mouse_y,obj_b_input_h)
with (obj_b_input_h) { input_active = false }
if (active_instance != noone) {
with (active_instance) {
keyboard_string = global.caph;
input_active = true;
}
}
}
//Draw Event
{
draw_sprite(sprite_index,input_active,x,y)
draw_set_color(c_white)
showtext = string_replace_all(global.caph,"#","\#")
draw_text(x,y,showtext + input_cursor[input_active])
draw_text(x,y-25,"Height")
}
i don't know what is the problem with the code
Edited by gameside, 20 March 2012 - 05:08 PM.











