hakuren Posted February 3, 2014 Posted February 3, 2014 (edited) how to disable all the symbol using input only letters and number ex. input @input$; if ( no input symbol == 1) all the symbol will become error sorry bad english Edited February 3, 2014 by hakuren Quote
Kido Posted February 5, 2014 Posted February 5, 2014 as far as i know that can't be just thell them to don't use symbols (?) http://rathena.org/wiki/Input have you tryied to search on script_commans.txt D:? i couldn't find something to prevent this Quote
AnnieRuru Posted February 5, 2014 Posted February 5, 2014 prontera,155,185,5 script sdkfjhsdkfh2 100,{ input .@test$; query_sql "select '"+ escape_sql( .@test$ )+"' regexp '^[a-z0-9]+$'", .@value; if ( .@value ) dispbottom "pass"; else dispbottom "fail"; end; }------ OR ------ prontera,150,185,5 script sdkfjhsdkfh 100,{ input .@test$; if ( preg_match( "^[a-zA-Z0-9]+$", .@test$ ) ) dispbottom "pass"; else dispbottom "fail"; end; }I still remember last time during eathena times, this preg_match crashed my eathena 12068 test serverI couldn't remember what was the syntax already ... it was 3 years ago I didn't post on the forum because it was just a custom modification release at the time if you guys able to find the bug then file a report then ... because now this is an official script command =/ Quote
hakuren Posted February 5, 2014 Author Posted February 5, 2014 prontera,155,185,5 script sdkfjhsdkfh2 100,{ input .@test$; query_sql "select '"+ escape_sql( .@test$ )+"' regexp '^[a-z0-9]+$'", .@value; if ( .@value ) dispbottom "pass"; else dispbottom "fail"; end; }------ OR ------ prontera,150,185,5 script sdkfjhsdkfh 100,{ input .@test$; if ( preg_match( "^[a-zA-Z0-9]+$", .@test$ ) ) dispbottom "pass"; else dispbottom "fail"; end; }I still remember last time during eathena times, this preg_match crashed my eathena 12068 test serverI couldn't remember what was the syntax already ... it was 3 years ago I didn't post on the forum because it was just a custom modification release at the time if you guys able to find the bug then file a report then ... because now this is an official script command =/ yes it works! [quote] prontera,155,185,5 script sdkfjhsdkfh2 100,{ input .@test$; query_sql "select '"+ escape_sql( .@test$ )+"' regexp '^[a-z0-9]+", .@value; if ( .@value ) dispbottom "pass"; else dispbottom "fail"; end; } thank you so much Quote
Question
hakuren
how to disable all the symbol using input only letters and number
ex. input @input$;
if ( no input symbol == 1)
all the symbol will become error
sorry bad english
Edited by hakuren3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.