当我尝试使用条件来使用“> =”或什至“ =”时,我遇到语法错误时,我正在尝试为游戏制作升级系统。我在这里寻找了很多站点和许多问题,但是什么都没做,我真的很想使用“> =”方法。
<ul>
{% for value in array %}
{% set the_index = attribute(another_array, loop.index) %}
<li>{{ the_index }}</li>
{% endfor %}
</ul>
错误:
Playername = x;
Playerhp = 20*Playerlvl;
Playerattack = 5*Playerlvl;
Playerlvl = 1;
Playerexp = 0;
Levelup = Playerlvl + 1
{
if Playerexp > 100
# TODO: Levelup
else do nothing
if condition:Levelup
# TODO: print("Playername" Leveled Up to "Playerlvl")