Reading documentation can be confusing, it's difficult at first but once you learn a few things it will make sense.
You can skip to the bottom for the answer, but it will help you in the long run to understand some how it works to read this whole post.
The first thing is noticing the function is inside the DataManager class. This is a
static class, which means everything is accessed by using DataManager itself. In fact, all the manager classes in MV are static.
For a sample property named "someProperty" and a sample method name "someMethod" on the DataManager
static class, it would be accessed like this:
Code:
DataManager.someProperty;
DataManager.someMethod();
You might wonder what is the difference between a
method and a
function. Most people would say in JS that a method is a type of function, it is a function that is owned by a class, it doesn't stand by itself.
You might also wonder what is the difference between a
static class and a regular (not-static) class. An example of a regular class is Game_Actor. We have Harold, Therese, Marsha, etc. all are instances of Game_Actor, there can be as many Game_Actor instances as you want. But there's only one DataManager.
Now back to this method. You might know in JS (and many languages actually) that to execute a function you have to use "()". If you want to pass any arguments you put them inside the "()". You might know this one:
Notice it has something inside the "()". The argument name is
switchId and the type is
number. Also this method will give you a value that is either
true or
false, that is a
boolean value.
The documentation for that looks like:
Code:
value(switchId: number): boolean
It means you call the method and pass a number between the "()". That number refers to the switchId to check and then it returns a boolean as the answer.
Code:
isThisGameFile(savefileId: number): boolean
Returns a boolean value given a savefileId. If the savefileId exists; the value will be true.
It's similar for this method, you pass the savefileId which is a
number, and it returns
true or
false.
So the final answer is in the conditional branch, you would write this, which will return
true or
false.
Code:
DataManager.isThisGameFile(5)