You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -206,9 +211,17 @@ function registerFunction (name,ft,...)
206
211
localarguments= {...}
207
212
fori,arginipairs (arguments) do
208
213
ifstring.sub(arg,1,1) =="(" andstring.sub(arg,-1) ==")" then
209
-
arguments[i] ="if args["..i.."] and type(args["..i.."]) ~= '"..string.sub(arg,2,-2).."' then return not outputDebugString('bad argument at "..name..""..arg.." expected, got '..type(args["..i.."])) end"
214
+
arguments[i] ="if args["..i.."] and type(args["..i.."]) ~= '"..string.sub(arg,2,-2).."' then return not outputDebugString('bad argument #"..i.." at "..name..""..arg.." expected, got '..type(args["..i.."])) end"
215
+
elseifstring.find(arg,"/") then
216
+
localargs=split(arg,"/")
217
+
localstr=""
218
+
fork,arginipairs (args) do
219
+
str=str.."type(args["..i.."]) ~= '"..arg.."' and "
220
+
end
221
+
str=string.sub(str,1,-5)
222
+
arguments[i] ="if "..str.." then return not outputDebugString('bad argument #"..i.." at "..name..""..arg.." expected, got '..type(args["..i.."])) end"
210
223
else
211
-
arguments[i] ="if type(args["..i.."]) ~= '"..arg.."' then return not outputDebugString('bad argument at "..name..""..arg.." expected, got '..type(args["..i.."])) end"
224
+
arguments[i] ="if type(args["..i.."]) ~= '"..arg.."' then return not outputDebugString('bad argument #"..i.."at "..name..""..arg.." expected, got '..type(args["..i.."])) end"
0 commit comments