FAILED TO LOAD SCRIPT DATA
Posts
Pages:
1
I recently picked up RPG Maker XP. I added a script to the main script, and later started getting this error. I cannot open the particular game I put the script on. The script is as follows:
class Game_Actor < Game_Battler
alias exp_normal exp
def exp=(exp)
@exp = [.min, 0].max
# Level up
while @exp >= @exp_list and @exp_list > 0
@level += 1
# Learn skill
for j in $data_classes.learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
# heal
@hp = self.maxhp
@sp = self.maxsp
end
# Level down
while @exp < @exp_list
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = .min
@sp = .min
end
end
Does anyone know how I can fix this without losing my game?
class Game_Actor < Game_Battler
alias exp_normal exp
def exp=(exp)
@exp = [.min, 0].max
# Level up
while @exp >= @exp_list and @exp_list > 0
@level += 1
# Learn skill
for j in $data_classes.learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
# heal
@hp = self.maxhp
@sp = self.maxsp
end
# Level down
while @exp < @exp_list
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = .min
@sp = .min
end
end
Does anyone know how I can fix this without losing my game?
author=Zzyxk
I recently picked up RPG Maker XP. I added a script to the main script, and later started getting this error. I cannot open the particular game I put the script on. The script is as follows:
class Game_Actor < Game_Battler
alias exp_normal exp
def exp=(exp)
@exp = [.min, 0].max
# Level up
while @exp >= @exp_list and @exp_list > 0
@level += 1
# Learn skill
for j in $data_classes.learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
# heal
@hp = self.maxhp
@sp = self.maxsp
end
# Level down
while @exp < @exp_list
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = .min
@sp = .min
end
end
Does anyone know how I can fix this without losing my game?
You could get the game back by copying everything except the script file (in the data folder) into a new project. Youll lose all scripts youve done though.
author=Zzyxk
I removed the script file in the data folder. And put it somewhere else. Then copy and pasted the folder. I am still getting the error.
Did you put a new script file in? An empty one from a new project?
author=ldida1author=ZzyxkDid you put a new script file in? An empty one from a new project?
I removed the script file in the data folder. And put it somewhere else. Then copy and pasted the folder. I am still getting the error.
I didn't at first. Realized my mistake, problem is solved. Thank you.
Quite unfortunate... I liked that script... full heal on level up.
author=Zzyxkauthor=ldida1I didn't at first. Realized my mistake, problem is solved. Thank you.author=ZzyxkDid you put a new script file in? An empty one from a new project?
I removed the script file in the data folder. And put it somewhere else. Then copy and pasted the folder. I am still getting the error.
Quite unfortunate... I liked that script... full heal on level up.
Theres a chance the reason the file wont open has little to do with the script. You can try putting it back in, it might work.
author=ldida1author=ZzyxkTheres a chance the reason the file wont open has little to do with the script. You can try putting it back in, it might work.author=ldida1I didn't at first. Realized my mistake, problem is solved. Thank you.author=ZzyxkDid you put a new script file in? An empty one from a new project?
I removed the script file in the data folder. And put it somewhere else. Then copy and pasted the folder. I am still getting the error.
Quite unfortunate... I liked that script... full heal on level up.
Alright, I'll try it out. At least I know how to recover the file. :)
Your script is all mucked up. If you're overwriting the whole method, you don't need to alias it. You left some things out from the original exp=() method...
Try this...
Just to be clear, you "Insert" above main, not "add to main"
Try this...
Just to be clear, you "Insert" above main, not "add to main"
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Change EXP # exp : new EXP #-------------------------------------------------------------------------- def exp=(exp) @exp = [[exp, 9999999].min, 0].max # Level up while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 @level += 1 # Learn skill for j in $data_classes[@class_id].learnings if j.level == @level learn_skill(j.skill_id) end end #heal @hp = self.maxhp @sp = self.maxsp end # Level down while @exp < @exp_list[@level] @level -= 1 end # Correction if exceeding current max HP and max SP @hp = [@hp, self.maxhp].min @sp = [@sp, self.maxsp].min end end
Pages:
1















