I want to write a function
whenever I call it must be make a sound alert is it possible in Lua ?
This should be your solution:
os.execute("echo \7")
or
os.execute("echo \a")
This creates a short beep (using the speaker, not the beeper).
** Tested on Windows. But should work in UNIX also.
print '\a'?