GetParamByID() public method

Get specified parameter that was passed from script to current host function.
public GetParamByID ( int id ) : ScriptVar
id int Number of parameter.
return ScriptVar
        ScriptVar ApiDebug(ScriptVM vm)
        {
            var str = string.Empty;

            for (int i = 0, iMax = vm.GetParamsCount(); i < iMax; i++)
            {
                str += " " + vm.GetParamByID(i).AsString;
            }
            Debug.LogFormat("[SCRIPT: {0}]{1}", Time.time, str);
            return(new ScriptVar());
        }
        ScriptVar ApiCallWithDelay(ScriptVM vm)
        {
            var count    = vm.GetParamsCount();
            var pTimeout = vm.GetParamByID(0);
            var pEvent   = vm.GetParamByID(1);

            if (count < 2 || !pTimeout.IsNumber || !pEvent.IsString)
            {
                _vm.SetRuntimeError("(nTimeout, sFuncName[, param1, param2]) parameters required");
                return(new ScriptVar());
            }
            ScriptVar?param1 = null;

            if (count > 2)
            {
                param1 = vm.GetParamByID(2);
            }
            ScriptVar?param2 = null;

            if (count > 3)
            {
                param2 = vm.GetParamByID(3);
            }
            ScriptVar?param3 = null;

            if (count > 4)
            {
                param3 = vm.GetParamByID(4);
            }
            ScriptVar?param4 = null;

            if (count > 5)
            {
                param4 = vm.GetParamByID(5);
            }

            CallFunctionWithDelay(pEvent.AsString, pTimeout.AsNumber, param1, param2, param3, param4);

            return(new ScriptVar());
        }