• 0
Sign in to follow this  
depomguss

getfreecell problem? or my fault?

Question

---------------------------------------
   
  *getfreecell "<map name>",<rX>,<rY>{,<x>,<y>,<rangeX>,<rangeY>,<flag>};
   
  Finds a free cell on the given map and stores the reference to the found cell
  in <rX> and <rY>. Passing <x> and <y> with <rangeX> and <rangeY> allows for
  searching within a specified area on the given map. The <flag> is a bitmask
  and has the following possible values:
  - 1 = Random cell on the map or from <x>,<y> range. (default)
  - 2 = The target should be able to walk to the target tile.
  - 4 = There shouldn't be any players around the target tile (use the no_spawn_on_player setting).

---------------------------

My Script:

getfreecell([email protected]$,[email protected],[email protected],[email protected],[email protected],10,10,2);

Got Error:

map_search_freecell: Incorrect usage! When src is NULL, flag has to be &1 and can't have &2

 

Thanks in advance.

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

you probably didnt attach the script to a player, change the flag to 1 if that is intended behavior

Share this post


Link to post
Share on other sites
  • 0

@Emistry Thanks for your answer .
I already attached player to script.

paramk,112,84,0	script	set	2_BULLETIN_BOARD,{
	mes "playerattached - " + playerattached();
	mes "getattachedrid - " + getattachedrid();
	getmapxy([email protected]$,[email protected],[email protected],BL_PC);
	getfreecell([email protected]$,[email protected],[email protected],[email protected],[email protected],10,10,2);
	mes "Return value not random - "[email protected];
    end;
}

Got Error:

[Debug]: map_search_freecell: Incorrect usage! When src is NULL, flag has to be &1 and can't have &2

I want to find a cell  that charactor able to walk to the target.  (*checkcell won't work in my case)

 

 

 

Capture.PNG

Edited by depomguss

Share this post


Link to post
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.

Guest
Answer this question...

×   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.

Loading...
Sign in to follow this