03-17-2011, 06:20 AM
I have been playing around with this, its pretty awesome and may just be what I am looking for. I modified the Mindless class into this.
and when I try to encrypt from my text file I get this
I am not certain how to actually debug in this case, can you see anything obvious and point me in the right direction?
Here is the text file
Code:
module RPG
class Mindless
attr_accessor :id
attr_accessor :name
attr_accessor :species
attr_accessor :hp
attr_accessor :maxhp
attr_accessor :mp
attr_accessor :maxmp
attr_accessor :level
attr_accessor :attack
attr_accessor :defense
attr_accessor :spirit
attr_accessor :speed
attr_accessor :aptitude
attr_accessor :iv
attr_accessor :traits
attr_accessor :ability
attr_accessor :exp
def initialize
@id = 0
@name = ""
@species = ""
@hp = 0
@maxhp = 0
@mp = 0
@maxmp = 0
@level = 0
@attack = 0
@defense = 0
@spirit = 0
@speed = 0
@aptitude = 0
@iv = [0,0,0,0,0,0,0]
@traits = [0,0,0,0]
@ability = 0
@exp = [0,0,0,0,0,0,0,0]
end
end
end
and when I try to encrypt from my text file I get this
Quote:Script 'Data Encrypter/Decrypter' line 321: NoMethodError occurred.I know the error is with 'var_data = name[1].chomp', but that is as far as my knowledge goes lol.
private method `chomp' called for nil:NilClass
I am not certain how to actually debug in this case, can you see anything obvious and point me in the right direction?
Here is the text file
Code:
id = 1
name = "Koromon"
species = "Dragon"
hp = 77
maxhp = 77
mp = 58
maxmp = 58
level = 3
attack = 52
defense = 35
spirit = 38
speed = 36
aptitude = 10
iv = [0,0,0,0,0,0,0]
traits = [1,0,0,0]
ability = 0
exp=[0,0,0,0,0,0,0,0]
id = 2
name = "Tsunomon"
species = "Beast"
hp = 94
maxhp = 94
mp = 57
maxmp = 57
level = 3
attack = 65
defense = 34
spirit = 35
speed = 30
aptitude = 10
iv = [0,0,0,0,0,0,0]
traits = [2,0,0,0]
ability = 0
exp=[0,0,0,0,0,0,0,0]