I'm trying to make this simple program that casts a spell only if there is no argument passed. i cant figure it out it keeps saying args[1] is indexing a nil value.
'
and while im asking might as well ask how to use the arg in Send to if i'm not right.
Here's the alias:
Alright i think i just figured out a solution still if you want to add anything to this please do.
if args[1] ~= nil then
Send("cast 'invis'" .. args[1])
end
and while im asking might as well ask how to use the arg in Send to if i'm not right.
Here's the alias:
^sup( .*)?$
[string "Alias: "]:1: attempt to index global 'args' (a nil value)
stack traceback:
[string "Alias: "]:1: in main chunk
Alright i think i just figured out a solution still if you want to add anything to this please do.
Send("cast 'invis'%1")
if "%1" == "" then
Send("cast 'detect invis'")
Send("cast 'protection evil'")
Send("cast 'detect evil'")
Send("cast 'detect magic'")
Send("cast 'detect alignment'")
end
Send("cast 'bless'%1")
Send("cast 'armor'%1")
Send("cast 'holy armor'%1")
Send("cast 'frenzy'%1")