Problems with character.changeroom?

Started by Icey, Sat 08/10/2011 23:32:02

Previous topic - Next topic

Icey


For some reason when ever I go to start the game I get a error message about can't convert character to int.

Code: ags
void ChangeRoomSaveXY(this Character*, int room_number, int x, int y)
{
  if (this == player)
  {
    px = this.x;
    py = this.y;
  }
  this.ChangeRoom(this, room_number, x, y);//This is the line I am directed to when using Dennis.ChangeRoom(x,x,x);
}

void ReturnToPreviousRoomAndPosition(this Character*)
{
  if (this != player) this.ChangeRoom(this.PreviousRoom);
  else this.ChangeRoom(this.PreviousRoom, px, py);
}



The thing is that I am using the normal character.changeroom however I think this line altered the function so it gives me this error.

Wyz

It looks like you have a parameter too many in the function call. Change it to:
Quote
this.ChangeRoom(room_number, x, y);
Life is like an adventure without the pixel hunts.

Icey


SMF spam blocked by CleanTalk