No such variable error

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 181
Баллы
113
Not sure what this means but my template stopped to work.
I had some variable login in past, but then I have deleted it.


ZennoLab.TemplateManipulator.V4.Helpers.InvalidVariableException: No such variable: login ---> System.InvalidOperationException: Sequence contains no matching element
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
at ZennoLab.TemplateManipulator.V4.StaticBlocks.Components.VariablesV4.get_Item(String parName)
--- End of inner exception stack trace ---
at ZennoLab.TemplateManipulator.V4.StaticBlocks.Components.VariablesV4.get_Item(String parName)
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.TN1hklbijQ3S38yxAb4R(Object , Object )
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.ExecSimpleMacross(String value)
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.MyMatchReplaceForMacross(Match match)
at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat)
at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator)
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.HlUCwPbdArCS4tJil5jA(Object , Object , Object )
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.ExecComplexMacrossInt(String value)
at ZennoLab.ZennoPoster.Modules.Macros.MacrosExecutor.ExecComplexMacross(String value)
at ZennoLab.ZennoPoster.Modules.TemplateExecutor.V5.ExecutorOfStepsV5.QICvMpbO9dOQehnZoNVm(Object , Object )
at ZennoLab.ZennoPoster.Modules.TemplateExecutor.V5.ExecutorOfStepsV5.CompileCode(Boolean& errorCompile)
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 181
Баллы
113
Problem maker was Zenno generated code when you convert to C# You get comments with variables in them like "{-Variable.Username-}" if you have this in comments in C# nothing works :-)

// Set element value "{-Variable.Username-}"
he.SetValue(project.Variables["Username"].Value, instance.EmulationLevel, false);
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 226
Благодарностей
5 844
Баллы
113

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)