Jump to content
Korean Random
ZloyYurich

Отметки в карусели о процессе ПМ

Recommended Posts

Отсутствовала почему-то папка макросов. С ней всё работает правильно. Приношу извинения за беспокойство. 

  • Upvote 1

Share this post


Link to post

Short link
Share on other sites

@ktulho по КД спамит в лог

2022-09-14 14:19:26: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (,2)
     ^
SyntaxError: invalid syntax
arg='sum(,2)'
2022-09-14 14:19:35: [ERROR] Traceback (most recent call last):
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 156, in process
    (func, deterministic) = __get_function(arg)
  File "res_mods/mods/xfw_packages\xvm_pymacro\python\__init__.py", line 117, in __get_function
    args = ast.literal_eval(args_string)
  File "scripts/common/Lib/ast.py", line 49, in literal_eval
  File "scripts/common/Lib/ast.py", line 37, in parse
  File "<unknown>", line 1
    (,2)
     ^
SyntaxError: invalid syntax
arg='sum(,2)'

 

прописано так:

// Уровень полевой модернизации
{"enabled": true, "x": 133, "y": 19, "layer": "normal", "width": 24, "height": 24, "src": "{{v.levelPostProgress?xvm://res/TPblHbl4/modernization/number_{{v.level=6?{{v.levelPostProgress=5?max|{{v.levelPostProgress}}}}|{{v.level={{py:sum({{v.levelPostProgress}},2)}}?max|{{v.levelPostProgress}}}}}}}}.png" },

 

Share this post


Link to post

Short link
Share on other sites

@steaxch да, я тоже заметил, что что-то изменилось в парсинге py_macro. Теперь при таком форматировании:

{{py_macro?{{sum({{py_macro}}, 1)}}|no}}

Макрос sum (и не только) выполняется, даже если py_macro равен None, хотя данная конструкция вернёт no, как и должно. Может @Mixaill что-нибудь подскажет.

Пока попробуй добавить любое число, например:

{{py_macro?{{sum({{py_macro|0}}, 1)}}|no}}

 

Edited by ktulho

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...