Change pov transfer object to Random Region

Jennifer Wren
02 Aug 2023, 10:48

The script is pretty straight forward and has worked before
{
ChangePOV (mice)
Random_Region_Parent (mice)
MoveObject (cat, room)
}
The error message was that there were "no parameters passed to move object - expecting 1 parameter"
Does something actually cause these errors? I hope I can fix them. (there were a few)
It wasn't not working offline, at least.


mrangel
02 Aug 2023, 18:21

Is the error in the code there, or inside Random_Region_Parent?

The error message seems confusing, because parameter checking only checks the number of formal parameters; if it was something like room being undefined, it should give a different message.


Jennifer Wren
03 Aug 2023, 00:54

I was supposed to move from one pov to another and then move that player object from room to a random region. I was clicking through the keys too fast or something because I had made all the qualifications and was still there, and clicking through the keys fast is all I can see that I was possibly doing wrong. Then, finally, I waited for a second instead of continuing, and it said I was the new pov, so I was in the random region, but first it displayed the error message. I changed the script to make it a little bit easier to get out of the room, but I still don't know what I can do about the error or where it is. I think it was my key speed.


Jennifer Wren
03 Aug 2023, 01:02

I had the parameter of Random_Region_Parent set to mice. I double checked. Would it be because the mice were not in the room with the other pov?


Jennifer Wren
05 Aug 2023, 00:36

.


mrangel
05 Aug 2023, 08:34

It shouldn't make any difference; the game only cares about the current pov object.

It's hard to figure out what's going on here, because I don't know what function the error is with.

I tried to replicate the error message you pasted, and the closest I can get it one of:

  • Error running script: Too few parameters passed to MoveObject function - only 1 passed, but 2 expected
  • Error running script: No parameters passed to RemoveObject function - expected 1 parameters

Have you created a function called move object? If so, look to see if you've got move object on a line by itself somewhere. But that's still not a perfect match, because the error message you pasted doesn't include the word "function", which makes me wonder if it's something completely different that I've not come across before.


Jennifer Wren
07 Aug 2023, 19:43

I have found the problem. It was that an object script had been partially deleted in code view, after being missubstituted in tabs, and had been left blank. I will just have to be more careful.