Maruno
Lead Dev of Pokémon Essentials
- 5,286
- Posts
- 17
- Years
- Seen May 3, 2024
Those line numbers don't match up with whatever's in my scripts, so I can't analyse much of what may be going on. However, I'll have a guess.Ok guys, i didn't want to ask any more questions here but i have one more. You'll see, I'm making my own move effects and I got this error:
So, this thing is telling me that I didn't initialize the constant PokeBattle_Move::PokeBattle_Move_115.Code:--------------------------- Pokémon Topaz Gem --------------------------- Exception: NameError Message: (eval):1:in `pbFromPBMove'uninitialized constant PokeBattle_Move::PokeBattle_Move_115 PokeBattle_Move:888:in `pbFromPBMove' PokeBattle_Battler:204:in `eval' PokeBattle_Move:888:in `pbFromPBMove' PokeBattle_Battler:204:in `pbInitPokemon' PokeBattle_Battler:396:in `pbInitialize' PokeBattle_Battle:707:in `pbStartBattleCore' PokeBattle_Battle:563:in `pbStartBattle' PokemonField:485:in `pbWildBattle' PokemonField:484:in `pbSceneStandby' PokemonField:486:in `pbWildBattle' This exception was logged in errorlog.txt. Press Ctrl+C to copy this message to the clipboard. --------------------------- Ok ---------------------------
I added it to the move effects sript and also on the AI, but it still tells me that this is wrong, so how can I initialize that constant?
This move is suposed to call a Fog weather... yes ALL the Fog weather lines are already on the scripts, I have also an ability named "Foggy Sky" that allows you to call it, like Drizzle calls Rain, but I wanna call it from a move named "Fog Rise" too, and the index 115 is suposed to be the next after the 114(Charge Beam's effect).
PokeBattle_MoveEffects contains all the different move effects in the game (as you know). Each different effect is a different class, called PokeBattle_Move_XX, where "XX" is a hexadecimal number (from 00 to FF, missing a few because there aren't 256 different move effects in the game).
The correct class, I think, is called by the following line:
Code:
return eval(sprintf("[COLOR=Red]PokeBattle_Move_%02X.new(battle,move)[/COLOR]",movedata.function))
Try renaming the class to "D6", fixing the pbs file moves.txt to use "D6" for that move, and try again.