Some C# Help Needed

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 228
Благодарностей
685
Баллы
113
If I put the directives in the top of the C# code action it always throws an error. I have run this script in Visual Studio and it works fine. Can't get it to work in Zenno. Just a lowly carpenter here trying to get some records from a website. I have attached the template so one of you Master coders can help a guy out. Really appreciate it. Even the Zenno C# AI bot on telegram tells me this should work. I took the directives out of the top and added them into the GAC references.

Below is the error log.


2025-06-14 18:26:22.6323|WARN|ZennoLab.LogLibrary.InternalError|[PLAY]|Error occurred in module "Compiling code of action id: dbf04074-2f83-427d-b8e7-85f5be8a3597 action group id: 9b5d5061-91b9-4822-be42-f3abeabee51a"
Message: "Error in action "CS1513" "} expected". [Row: 0; Column: 2]"
2025-06-14 18:26:22.6323|WARN|ZennoLab.LogLibrary.InternalError|[PLAY]|Error occurred in module "Compiling code of action id: dbf04074-2f83-427d-b8e7-85f5be8a3597 action group id: 9b5d5061-91b9-4822-be42-f3abeabee51a"
Message: "Error in action "CS1519" "Invalid token 'return' in class, struct, or interface member declaration". [Row: 100; Column: 1]"
2025-06-14 18:26:22.6323|WARN|ZennoLab.LogLibrary.InternalError|[PLAY]|Error occurred in module "Compiling code of action id: dbf04074-2f83-427d-b8e7-85f5be8a3597 action group id: 9b5d5061-91b9-4822-be42-f3abeabee51a"
Message: "Error in action "CS1022" "Type or namespace definition, or end-of-file expected". [Row: 100; Column: 1]"
 

Вложения

Alex733

Client
Регистрация
27.11.2017
Сообщения
345
Благодарностей
246
Баллы
43
Apparently, you have to create common code block. Please downgrade version zennoposter in your template.
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 228
Благодарностей
685
Баллы
113
That doesn't help me at all. I don't know how to use the common code block or call it in the template.
 

Alex733

Client
Регистрация
27.11.2017
Сообщения
345
Благодарностей
246
Баллы
43
  • Спасибо
Реакции: bigcajones

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 886
Благодарностей
1 197
Баллы
113
Hi, Clint.
Open protection block and lower version and then save and re-upload template so I can get access to it.
134046
 
  • Спасибо
Реакции: bigcajones

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 228
Благодарностей
685
Баллы
113
Hi, Clint.
Open protection block and lower version and then save and re-upload template so I can get access to it.
Thanks Indy. I figured it out with the help of the Gemini chat bot. I ended up doing it with a little c# to download the pdf and encode the base64. I then used a POST request to the Gemini API. I did that in a separate template because I would like to understand how to do the whole thing in C# and how to use the shared code. I miss the old Code Creator where you could debug line by line. I have no problem with the Python code working, but who wants to see the command prompt open up every instance.

Also man, can you get me a copy of the forum's Security Certificate? For some reason I'm having a hard time getting on here. Keep getting kicked out by my network because they say the site is unsafe. I have only been able to get on here through Firefox, and not sure how long that will last. I've added it to the Trusted Sites and still getting kicked out. I was thinking if I could add the security certificate to the browsers, maybe i wouldn't have the problem. Right now I'm having to take out the 's' from https:// to get on here and even then, Chrome and Edge won't let me pass.
 

Вложения

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 228
Благодарностей
685
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 886
Благодарностей
1 197
Баллы
113
You don't need that Program method in c# actions. Consider c# action as a method. I have edited a little.
Also dont use Console logs, I have also added log method so you can change and print logs right in zennoposter or PM. If you wanna see in zennoposter you change that false flag to true.

You can also use internal methods for JSON, its basically the same as Newtonsoft just integrated in zenno already. Then you can see all json variables in the variable window.

Split your code over many c# actions. This way you can debug step by step.

About this forum issue i do not know. I'm using edge and it's fine. Do you use this new domain ? https://zenno.club/
As there is no English side of this forum issue thread try to post that issue there https://zenno.club/discussion/forums/o-rabote-foruma.12/
 

Вложения

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 228
Благодарностей
685
Баллы
113
Okay, thanks man. I was just following along what the Zennoposter c# bot on Telegram gave me. Appreciate the help. I can only get on with the Firefox browser and it still gives me a warning. Chrome and Edge won't allow me to navigate to the forum.
 

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