Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Error on Getting actor Parameter

A topic by RikuTeSeduse created 12 days ago Views: 50 Replies: 9
Viewing posts 1 to 4

Hello! I'm trying to use the plugin, I have a parameter added with the id 0, and the shortname "min" as shown in the image:

when i try to get the param of an actor with the command, it sends me this error:

this is the call I'm making for the actor parameter:

Developer

Hi there!

This error means that RPG Maker is not finding an actor. As I can see on your event command, you are using `$gameActors.actor(0)`. Actor with ID 0 does not exist. The minimum valid ID number for an actor is 1.

If what are you trying to do is to increase the variable with the value of the custom parameter from your player/party leader, you can try do this:

$gameParty.leader().cparam(0)

or

$gameParty.members()[0].cparam(0) → Here the 0 will work, because we are not poiting to an ID, but for a position(INDEX). And indexes, always start at 0 on javascript.

Hello, the error continue happening, i don't want to get the parameter from a party member but from an actor of all i have in the game.

in the project you have a camp and you can asign actors that are not in your party to do jobs, so i want to get the actual actor you have asigned to the work by using a variable that stores the worker actor id.

Developer

Did you change what I told you to change? With my plugin or without my plugin, using $gameActors.actor(0) will always give you an error. There is no actor with ID 0.

The error will stop if you put the right actor ID there.

Yes i did, i actually tried getting other variables assigned to the actor like $gameActors.actor(1).name() and it actually works for me, but not with $gameActors.actor(1).cparam(0)

Developer

That is strange.. the only way the error could continue to happening is if $gameActors.actor(1) was undefined or null. Meaning that no actor with ID 1 exist.

But you said it work fine with $gameActors.actor(1).name()

So, can you upload to me a sample project replicating the issue, so I can investigate? You can either upload it somewhere and send me the link here or send me the link through discord: hakuenstudio

I think maybe the error is coming becouse i'm using an spanish rmmz project, becouse I'm trying other plugins and in some of them i have issues no one else are having :(

Developer

I think there is nothing to do with the rmmz language you are using. Just send me a sample project replicating the error that I will find out what is the issue :)

uuuh thanks! i didn't knew the index started on 0 <3

Developer

Hi there!

Did you manage to solve the issue?