macro coding: problem with store_location function

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
viorc
Posts: 130
Joined: February 22nd, 2006, 3:03 am

macro coding: problem with store_location function

Post by viorc »

Is there anything wrong with this code (inside a macro) ?

Code: Select all

        {DEBUG_MSG "position: {NEW_POS_X},{NEW_POS_Y}"}
        [store_location]
                x,y={NEW_POS_X},{NEW_POS_Y}
                radius=1
                variable=center_location
        [/store_location]
        {DEBUG_MSG "Location n. $center_location.length"}
The output is:

Code: Select all

position: 13,10
Location n. 0 
while the tile (13,10) is in the middle of the map :shock: . I would have expect the number of matching locations being 7.
I compared it with existing code in various scenarii and it seems similar.
Any idea anyone ? Thanks in advance.
If I remove the line "radius=1", can I expect to get only the (13,10) tile as result ?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Try using the proper tag, [store_locations]. :P
Post Reply