Glitchfinder
Let's all get along, please?
- 477
- Posts
- 18
- Years
- Age 35
- The Twilight Zone
- Seen May 4, 2014
Add another number to each line of PBTypeChart.
Each line has 19 numbers, but you infact have 20 types because Normal is '0'.
That could be the problem. :x
EDIT: You have 19 lines and 19 effectiveness entries per line, but you have 20 types. Recheck your numbers you have there - but Normal is first and Spirit is last. You'll need to reconfigure the array by either adding another entry after the 0,s at the end and changing the 0s, or adding an entry before each 0, and adding a new line for the GOD element...
Actually, one of those 20 types has no effectiveness line in the chart. That is type #9, QMARKS, or ???. Anyway, I just tested it myself, and I found no errors. Here's what I've got:
Code:
#==============================================================================
# ** PBTypes
#------------------------------------------------------------------------------
# This class handles Pokemon types. Instructions for adding new types are
# included below.
#
#
# Step 1: Add a new type below the last default type (Dark), in the format
# TYPE = #. The number is one higher than the number of the previous
# type.
#
# Step 2: Change the return line in PBTypes.getCount to return #, where the
# number is equal to the last type's number. (See above)
#
# Step 3: Add a new line into the bottom of PBTypeChart, with the format
# specified there. Also, add an addition number to the end of each
# line in the chart, as well, also following the specified format.
# Add a comma at the end of the line before the last line. (Which
# you just added)
#
# Step 4: Add a new line to the bottom of PBTypes.getName(type) in the format
# _INTL("TYPE"). Add a comma to the end of the lines before the last
# one you added.
#
# Step 5: Make some new Pokemon and moves!
#
#
#==============================================================================
class PBTypes
#--------------------------------------------------------------------------
# * Prespecified Variables
#--------------------------------------------------------------------------
NORMAL = 0
FIGHTING = 1
FLYING = 2
POISON = 3
GROUND = 4
ROCK = 5
BUG = 6
GHOST = 7
STEEL = 8
QMARKS = 9
FIRE = 10
WATER = 11
GRASS = 12
ELECTRIC = 13
PSYCHIC = 14
ICE = 15
DRAGON = 16
DARK = 17
SPIRIT = 18
GOD = 19
#--------------------------------------------------------------------------
# * Count Types
# This number = the last type's number
# This number does not include QMARKS
#--------------------------------------------------------------------------
def PBTypes.getCount
return 19
end
#--------------------------------------------------------------------------
# * Type Chart
# Row = Attack type
# Column = Opponent type
# 0 = Immune
# 1 = "Not very effective"
# 2 = Normal
# 4 = "Super effective"
# New Type Info:
# Add a number to each line showing effect when attacked
# Add a new line showing type's effectiveness when attacking
# Make sure every line but the last one has a comma
#--------------------------------------------------------------------------
PBTypeChart = [
2,2,2,2,2,1,2,0,1,2,2,2,2,2,2,2,2,0,0,
4,2,1,1,2,4,1,0,4,2,2,2,2,1,4,2,4,0,0,
2,4,2,2,2,1,4,2,1,2,2,4,1,2,2,2,2,2,0,
2,2,2,1,1,1,2,1,0,2,2,4,2,2,2,2,2,0,0,
2,2,0,4,2,4,1,2,4,4,2,1,4,2,2,2,2,0,0,
2,1,4,2,1,2,4,2,1,4,2,2,2,2,4,2,2,2,0,
2,1,1,1,2,2,2,1,1,1,2,4,2,4,2,2,4,1,0,
0,2,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1,4,0,
2,2,2,2,2,4,2,2,1,1,1,2,1,2,4,2,2,1,0,
2,2,2,2,2,1,4,2,4,1,1,4,2,2,4,1,2,2,2,
2,2,2,2,4,4,2,2,2,4,1,1,2,2,2,1,2,2,2,
2,2,1,1,4,4,1,2,1,1,4,1,2,2,2,1,2,2,2,
2,2,4,2,0,2,2,2,2,2,4,1,1,2,2,1,2,2,2,
2,4,2,4,2,2,2,2,1,2,2,2,2,1,2,2,0,2,2,
2,2,4,2,4,2,2,2,1,1,1,4,2,2,1,4,2,2,2,
2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,4,2,2,2,
2,1,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1,4,2,
0,2,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1,4,2,
2,2,2,2,2,2,2,2,2,4,4,4,4,2,2,2,2,2,4
]
#--------------------------------------------------------------------------
# * Type Names
# Add the names of new types at the end of the list
# Make sure that every line but the last one has a comma
#--------------------------------------------------------------------------
def PBTypes.getName(type)
types = [
_INTL("NORMAL"),
_INTL("FIGHTING"),
_INTL("FLYING"),
_INTL("POISON"),
_INTL("GROUND"),
_INTL("ROCK"),
_INTL("BUG"),
_INTL("GHOST"),
_INTL("STEEL"),
_INTL("???"),
_INTL("FIRE"),
_INTL("WATER"),
_INTL("GRASS"),
_INTL("ELECTRIC"),
_INTL("PSYCHIC"),
_INTL("ICE"),
_INTL("DRAGON"),
_INTL("DARK"),
_INTL("SPIRIT"),
_INTL("GOD")
]
return types[type]
end
end
Yes, I did comment the script. Feel free to use it that way. I'll include a commented original version at the end of this post, in a spoiler. Anyway, I think the problem was in the move entry, so I'm including that as well.
Code:
355,RAGNAROK,RAGNAROK,00,100,GOD,Special,100,10,0,8,0,ef,Tough,"Strikes the foe with world-ending power."
Here's the original version of the script, with comments:
Spoiler:
Code:
#==============================================================================
# ** PBTypes
#------------------------------------------------------------------------------
# This class handles Pokemon types. Instructions for adding new types are
# included below.
#
#
# Step 1: Add a new type below the last default type (Dark), in the format
# TYPE = #. The number is one higher than the number of the previous
# type.
#
# Step 2: Change the return line in PBTypes.getCount to return #, where the
# number is equal to the last type's number. (See above)
#
# Step 3: Add a new line into the bottom of PBTypeChart, with the format
# specified there. Also, add an addition number to the end of each
# line in the chart, as well, also following the specified format.
# Add a comma at the end of the line before the last line. (Which
# you just added)
#
# Step 4: Add a new line to the bottom of PBTypes.getName(type) in the format
# _INTL("TYPE"). Add a comma to the end of the lines before the last
# one you added.
#
# Step 5: Make some new Pokemon and moves!
#
#
#==============================================================================
class PBTypes
#--------------------------------------------------------------------------
# * Prespecified Variables
#--------------------------------------------------------------------------
NORMAL = 0
FIGHTING = 1
FLYING = 2
POISON = 3
GROUND = 4
ROCK = 5
BUG = 6
GHOST = 7
STEEL = 8
QMARKS = 9
FIRE = 10
WATER = 11
GRASS = 12
ELECTRIC = 13
PSYCHIC = 14
ICE = 15
DRAGON = 16
DARK = 17
#--------------------------------------------------------------------------
# * Count Types
# This number = the last type's number
# This number does not include QMARKS
#--------------------------------------------------------------------------
def PBTypes.getCount
return 17
end
#--------------------------------------------------------------------------
# * Type Chart
# Row = Attack type
# Column = Opponent type
# 0 = Immune
# 1 = "Not very effective"
# 2 = Normal
# 4 = "Super effective"
# New Type Info:
# Add a number to each line showing effect when attacked
# Add a new line showing type's effectiveness when attacking
# Make sure every line but the last one has a comma
#--------------------------------------------------------------------------
PBTypeChart = [
2,2,2,2,2,1,2,0,1,2,2,2,2,2,2,2,2,
4,2,1,1,2,4,1,0,4,2,2,2,2,1,4,2,4,
2,4,2,2,2,1,4,2,1,2,2,4,1,2,2,2,2,
2,2,2,1,1,1,2,1,0,2,2,4,2,2,2,2,2,
2,2,0,4,2,4,1,2,4,4,2,1,4,2,2,2,2,
2,1,4,2,1,2,4,2,1,4,2,2,2,2,4,2,2,
2,1,1,1,2,2,2,1,1,1,2,4,2,4,2,2,4,
0,2,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1,
2,2,2,2,2,4,2,2,1,1,1,2,1,2,4,2,2,
2,2,2,2,2,1,4,2,4,1,1,4,2,2,4,1,2,
2,2,2,2,4,4,2,2,2,4,1,1,2,2,2,1,2,
2,2,1,1,4,4,1,2,1,1,4,1,2,2,2,1,2,
2,2,4,2,0,2,2,2,2,2,4,1,1,2,2,1,2,
2,4,2,4,2,2,2,2,1,2,2,2,2,1,2,2,0,
2,2,4,2,4,2,2,2,1,1,1,4,2,2,1,4,2,
2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,4,2,
2,1,2,2,2,2,2,4,1,2,2,2,2,4,2,2,1
]
#--------------------------------------------------------------------------
# * Type Names
# Add the names of new types at the end of the list
# Make sure that every line but the last one has a comma
#--------------------------------------------------------------------------
def PBTypes.getName(type)
types = [
_INTL("NORMAL"),
_INTL("FIGHTING"),
_INTL("FLYING"),
_INTL("POISON"),
_INTL("GROUND"),
_INTL("ROCK"),
_INTL("BUG"),
_INTL("GHOST"),
_INTL("STEEL"),
_INTL("???"),
_INTL("FIRE"),
_INTL("WATER"),
_INTL("GRASS"),
_INTL("ELECTRIC"),
_INTL("PSYCHIC"),
_INTL("ICE"),
_INTL("DRAGON"),
_INTL("DARK")
]
return types[type]
end
end