Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. -- inc.lua
  2. --
  3. -- Usage: <action application="set" data="ext=${lua(inc.lua $1 -30)}" />
  4. assert(stream, 'this is API command')
  5. local number = assert(argv[1])
  6. local delta  = argv[2] or 1
  7. local result = tonumber(number) + tonumber(delta)
  8. local fmt = string.format("%%.%dd", #number)
  9. result = string.format(fmt, result)
  10. stream:write(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement