short and quick help please

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
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

short and quick help please

Post by toms »

Can someone tell me if this is wrong?
If yes, how should it be?

Code: Select all

[store_unit]
 variable=checkside
 kill=no
  [filter]
  x=$x1
  y=$y1
  [/filter]
 [/store_unit]

 {VARIABLE_OP (|$checkside|_gold) add 1}
First read, then think. Read again, think again. And then post!
User avatar
Sapient
Inactive Developer
Posts: 4453
Joined: November 26th, 2005, 7:41 am
Contact:

Re: short and quick help please

Post by Sapient »

Yeah, that's pretty wrong. I think this is what you meant to do:

Code: Select all

[store_unit]
 variable=checkside
 kill=no
  [filter]
  x=$x1
  y=$y1
  [/filter]
 [/store_unit]
 {VARIABLE_OP gold_var format "side$checkside.side|_gold"}
 {VARIABLE_OP $gold_var add 1}
(but I didn't test it)
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

Yes, that looks more senseful. Thank you.
First read, then think. Read again, think again. And then post!
Post Reply