- 3
- Posts
- 10
- Years
- Seen Jul 15, 2020
Hello, Essentials/RPG maker xp noob here
So i have this event (see image attached)
The goal is to give a random Pokemon at a random level to the player .
Handling a random level is quite easy, i just use control variables to give me a number between 1 and 100 and asign it to a variable (26 in this case).
To handle the random pokemon i use this code
I then display this text :
Which actually displays a random pokemon name and random number.
the issue stems from this last piece of code:
which displays this error message
I can make this work if I
So i have this event (see image attached)
The goal is to give a random Pokemon at a random level to the player .
Handling a random level is quite easy, i just use control variables to give me a number between 1 and 100 and asign it to a variable (26 in this case).
To handle the random pokemon i use this code
Code:
$game_variables[27] = PBSpecies.getName(1+rand(PBSpecies.maxValue)).upcase
Code:
Hey \PN, take this \v[27], level \v[26] .
the issue stems from this last piece of code:
Code:
pbAddPokemon(:$game_variables[27],$game_variables[26])
Code:
---------------------------
Pokemon Essentials
---------------------------
[Pokémon Essentials version 17.2]
Exception: RuntimeError
Message: Script error within event 2 (coords 8,10), map 42 (Starting Lab):
Exception: SyntaxError
Message: (eval):1:in `pbExecuteScript'compile error
(eval):1: syntax error
pbAddPokemon(:pbGet(27),pbGet(26))
^
***Full script:
pbAddPokemon(:pbGet(27),pbGet(26))
Interpreter:276:in `pbExecuteScript'
Interpreter:1606:in `command_355'
Interpreter:494:in `execute_command'
Interpreter:193:in `update'
Interpreter:106:in `loop'
Interpreter:198:in `update'
Scene_Map:163:in `follow_update'
Scene_Map:161:in `loop'
Scene_Map:170:in `follow_update'
PokemonFollow:1551:in `update'
I can make this work if I