unexpected character after veriablename (expected are »,« oder »=«)

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Numero
Posts: 21
Joined: August 7th, 2018, 2:11 pm

unexpected character after veriablename (expected are »,« oder »=«)

Post by Numero »

Hey I got this new error and I just don't get it. I only want to turn those units, that have 10 hp or less, but I guess I don't really get Unit filters. This is my current code:

Unerwartete Zeichen nach einem Variablennamen (erwartet werden »,« oder »=«)
an Position ~add-ons/Orcmight/scenarios/02_Furt.cfg:332
included from ~add-ons/Orcmight/_main.cfg:35


Code: Select all


#Give you his almost dead units
    [event]
        name = turn end
        first_time_only = no
        [modify_unit]
            [filter]
                side=2
                [filter_wml]
                    self.hitpoints = 10
                [/filter_wml]
            [/filter]
            side = 1
        [/modify_unit]
    [/event]
    
    
User avatar
Pentarctagon
Project Manager
Posts: 5567
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: unexpected character after veriablename (expected are »,« oder »=«)

Post by Pentarctagon »

self.hitpoints = 10 should be formula = "self.hitpoints = 10"
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Numero
Posts: 21
Joined: August 7th, 2018, 2:11 pm

Re: unexpected character after veriablename (expected are »,« oder »=«)

Post by Numero »

It worked, thank you!
Post Reply