Jump to content
  • 0

about input


hakuren

Question


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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 hakuren
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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 server

I 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 =/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  127
  • Topics Per Day:  0.03
  • Content Count:  1445
  • Reputation:   163
  • Joined:  08/17/13
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  120
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   6
  • Joined:  12/02/11
  • Last Seen:  

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 server

I 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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...