# Draw Pokémon type(s)
type1rect = Rect.new(0,@pokemon.type1*28,64,28)
type2rect = Rect.new(0,@pokemon.type2*28,64,28)
type3rect = Rect.new(0,@pokemon.type3*28,64,28)
if @
[email protected]
overlay.blt(402,146,@typebitmap.bitmap,type1rect)
else
overlay.blt(370,146,@typebitmap.bitmap,type1rect)
overlay.blt(405,146,@typebitmap.bitmap,type2rect)
end
# Draw Exp bar
if @pokemon.level<PBExperience.maxLevel
w = @pokemon.expFraction*128
w = ((w/2).round)*2
pbDrawImagePositions(overlay,[
["Graphics/Pictures/Summary/overlay_exp",362,372,0,0,w,6]
])
end
end
That's from PScreen_Summary
this is from PokedexMain
for i in 1...regionalSpecies.length
nationalSpecies = regionalSpecies
if pbCanAddForModeList?($PokemonGlobal.pokedexMode,nationalSpecies)
form = $Trainer.formlastseen[nationalSpecies][1] || 0
fspecies = pbGetFSpeciesFromForm(nationalSpecies,form)
color = speciesData[fspecies][SpeciesColor] || 0
type1 = speciesData[fspecies][SpeciesType1] || 0
type2 = speciesData[fspecies][SpeciesType2] || type1
type3 = speciesData[fspecies][SpeciesType3] || type1
shape = speciesData[fspecies][SpeciesShape] || 0
height = speciesData[fspecies][SpeciesHeight] || 1
weight = speciesData[fspecies][SpeciesWeight] || 1
shift = DEXES_WITH_OFFSETS.include?(region)
dexlist.push([nationalSpecies,PBSpecies.getName(nationalSpecies),
height,weight,i,shift,type1,type2,color,shape,type3])
end
end
return dexlist
end
And for PokedexEntry
# Show the owned icon
imagepos.push(["Graphics/Pictures/Pokedex/icon_own",212,44])
# Draw the type icon(s)
type1 = speciesData[SpeciesType1] || 0
type2 = speciesData[SpeciesType2] || type1
type3 = speciesData[SpeciesType3] || 0
type1rect = Rect.new(0,type1*32,96,32)
type2rect = Rect.new(0,type2*32,96,32)
type3rect = Rect.new(0,type3*32,96,32)
overlay.blt(296,120,@typebitmap.bitmap,type1rect)
overlay.blt(331,120,@typebitmap.bitmap,type2rect) if type1!=type2
overlay.blt(366,120,@typebitmap.bitmap,type3rect) if type1!=type3
else
# Write the kind
textpos.push([_INTL("????? Pokémon"),246,74,0,base,shadow])
# Write the height and weight
if pbGetCountry()==0xF4 # If the user is in the United States
textpos.push([_INTL("???'??""),460,158,1,base,shadow])
textpos.push([_INTL("????.? lbs."),494,190,1,base,shadow])
else
textpos.push([_INTL("????.? m"),470,158,1,base,shadow])
textpos.push([_INTL("????.? kg"),482,190,1,base,shadow])
end
end
edit: whoops, forgot about Battler_Initialize
def pbInitBlank
@name = ""
@species = 0
@form = 0
@level = 0
@hp = @totalhp = 0
@type1 = @type2 = @type3 = 0
@ability = 0
@item = 0
@gender = 0
@attack = @defense = @spatk = @spdef = @speed = 0
@status = PBStatuses::NONE
@statusCount = 0
@pokemon = nil
@pokemonIndex = -1
@participants = []
@moves = []
@iv = [0,0,0,0,0,0]
end
and here's the error message I get that crashes the game to desktop when I look at a Pokemon in the Pokemon Summary screen
---------------------------
Pokemon Sunrise Pink
---------------------------
[Pokémon Essentials version 18.1]
Exception: NoMethodError
Message: undefined method `*' for nil:NilClass
Backtrace:
PScreen_Summary:440:in `drawPageOne'
PScreen_Summary:349:in `drawPage'
PScreen_Summary:165:in `pbStartScene'
PScreen_Summary:1315:in `pbStartScreen'
PScreen_Party:639:in `pbSummary'
PScreen_Party:1217:in `pbPokemonScreen'
PScreen_Party:1114:in `loop'
PScreen_Party:1323:in `pbPokemonScreen'
PScreen_PauseMenu:178:in `pbStartPokemonMenu'
PScreen_PauseMenu:175:in `pbFadeOutIn'
This exception was logged in
C:\Users\MYNAME\Saved Games\Pokemon Sunrise Pink\errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------