Edited it again. I changed the number to 19 and removed the names (it was only there for convenience so I wouldn't keep forgetting what each one was.) This is what it looks like now:
class PBTypes
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
def PBTypes.getCount
# Change this number if you add a new type
# This number doesn't include QMARKS
return 19
end
PBTypeChart=[
# Rows indicate the attack's type
# Columns indicate the opponent's type
# 0 - Immune
# 1 - "Not very effective"
# 2 - Normal
# 4 - "Super effective"
# When you add a new type, add a number showing effect
# on opponents with that type to each line, then add a
# new line showing effect on attacks with the new type
# on opponents.
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,
]
def PBTypes.getName(type)
# Add the names of new types at the end of
# this list
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
And once again, I get the (insert various cursing here) message
Exception: RuntimeError
Message: Undefined value GOD in PBTypes (section File PBS/moves.txt, line 355
GOD,Special,100,10,0,08,0,ef,Tough,"Strikes the foe with world-ending power."
, key )
Compiler:1881:in `checkEnumField'
Compiler:1906:in `csvEnumField!'
Compiler:397:in `pbGetCsvRecord'
Compiler:363:in `each'
Compiler:363:in `pbGetCsvRecord'
Compiler:969:in `pbCompileMoves'
Compiler:968:in `pbCompilerEachPreppedLine'
Compiler:497:in `each_line'
Compiler:497:in `pbCompilerEachPreppedLine'
Compiler:494:in `open'
There is also a problem in your
PBTypeChart=[
# Rows indicate the attack's type
# Columns indicate the opponent's type
# 0 - Immune
# 1 - "Not very effective"
# 2 - Normal
# 4 - "Super effective"
# When you add a new type, add a number showing effect
# on opponents with that type to each line, then add a
# new line showing effect on attacks with the new type
# on opponents.
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,
]
There must not be a coma after the last 4.
When u copy something, make sure u do it well and that u understand what u do :/ . PBTypeChart is an array and all the components are separated by comas so wen u put a coma at the end, it looks for another number but it doesn't find it.
Yaoimutt is also right for the comas u forgot. Correct it and say us if it goes well now.