Jump to content
  • 0

getfreecell problem? or my fault?


Question

Posted
---------------------------------------
   
  *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(.@m$,.@x2,.@y2,.@x,.@y,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.

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

@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(.@m$,.@x,.@y,BL_PC);
	getfreecell(.@m$,.@x2,.@y2,.@x,.@y,10,10,2);
	mes "Return value not random - "+.@x2;
    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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...