Est IsAlpha

From EventScripts Community Encyclopedia
Syntax: est_IsAlpha <variable> <string>
Note: Command parameters are described inside the < and > characters. Optional parameters are contained within [ and ] characters.

Contents

Description

  • Checks if the string only contains letters

Parameters

  • variable - The variable to store the returned value in
  • string - The string to check

Example


event player_activate
{
  es_xsetinfo alphacheck 0
 
  // True
  es_xsetinfo numeric abc
  es_xdoblock example/check_letters
 
  // True
  es_xsetinfo numeric AbcBcBA
  es_xdoblock example/check_letters
 
  // False
  es_xsetinfo numeric sdfaadfg.
  es_xdoblock example/check_letters
}
 
block check_letters
{
  es est_IsAlpha alphacheck server_var(numeric)
  if(server_var(alphacheck) == 1) then echo All letters
  if(server_var(alphacheck) == 0) then echo Not all letters
}

Notes

  • None

See Also

blog comments powered by Disqus