Skip to content

Instantly share code, notes, and snippets.

@masterpoppy
Created October 13, 2018 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masterpoppy/11312157c2a6b8e3e7ad91d1e28a327d to your computer and use it in GitHub Desktop.
Save masterpoppy/11312157c2a6b8e3e7ad91d1e28a327d to your computer and use it in GitHub Desktop.
// *************************
// check-alphanumeric.lsl
//*************************
integer ch = -1;
integer handle;
textbox(key user, string msg)
{
llListenRemove(handle);
handle = llListen(ch, "", user, "");
llTextBox(user, msg, ch);
}
default
{
touch_end(integer index)
{
textbox(llDetectedKey(0), "\n名前を入力してください。(英数字のみ)");
}
listen(integer channel, string name, key id, string message)
{
if(-1 == llSubStringIndex(llEscapeURL(message), "%"))
{
llSay(0, "NAME: " + message);
}
else{
textbox(id, "\n名前に使用できる文字は英数字のみです。\n入力データ: " + message);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment