- Joined
- Dec 31, 2013
- Messages
- 105
- Reaction score
- 7
- First Language
- English
I'm working with RPG Maker VX Ace and so far I got it working for the most part but when i try to go to the GF character to set skills for learning I get an error stating
Crystal Engine - GF Menu line 222: NoMethodError occurred.
undefined method 'has_key?' for nil:NilClass.
Here are lines 221-223 of the script.
221 def include?(item)
222 @actor.learning_skills.has_key?(item.id)
223 end
Then the next issue is when i finish a fight I get another error
Crystal Engine - GF Junction line 157: NoMethodError occurred. Undefined method "[]" for nil:Class.
Here are the lines for that statement
153 class <<self; alias gain_exp_ce_junction gain_exp; end
154 def self.gain_exp
155 $game_party.guardian_forces.each do |actor|
156 actor.gain_ap($game_troop.ap_total)
157 if actor.learning_skills[actor.learning_skill][0] == actor.learning_skills[actor.learning_skill][1]
158 text = sprintf(Vocab:
btainSkill, $data_skills[actor.learning_skill].name)
159 $game_message.add('\.' + text)
160 end
Also I'm creating a class and gender system using events and a map. When I say yes to the class I want I get another error: Crystal Engine - GF Junction line 225: typeError occurred. Nil can't be coerced into Fixnum.
Here are the lines of this statement:
223 alias change_exp_gf_junction change_exp
224 def change_exp(exp, show)
225 value = exp - self.exp
226 @junctioned_actors.each do |actor|
227 actor.change_exp(actor.exp + (value / @junctioned_actors.size), show)
228 end
Now if I change line 225 to value = self.exp I fix the error above but then when I walk for a bit I get this error:
Crystal Engine - GF Junction line 285: NoMethodError occurred. undefined method "[]" for nil:NilClass.
Here are the lines of that statement:
279 alias refresh_ce_gf_juntion refresh
280 def refresh
281 refresh_ce_gf_juntion
282 return if @junction_skills.nil?
283 return if @junction_skills.empty?
284 return if @learning_skill == 0
285 if @junction_skills[@learning_skill][0] == @junction_skills[@learning_skill][1]
286 skills = @junction_skills.keys
287 index = skills.index(@learning_skill)
288 @learning_skill = skills[index + 1]
289 if @learning_skill.nil?
290 @junction_skills.each do |key, ap|
291 unless ap[0] == ap[1]
292 @learning_skill = key
293 return
294 end
295 end
296 end
Can someone please help me I need to get these working before I feel I can move on to continue the game I'm creating. Sorry for creating such a wall of text.
Crystal Engine - GF Menu line 222: NoMethodError occurred.
undefined method 'has_key?' for nil:NilClass.
Here are lines 221-223 of the script.
221 def include?(item)
222 @actor.learning_skills.has_key?(item.id)
223 end
Then the next issue is when i finish a fight I get another error
Crystal Engine - GF Junction line 157: NoMethodError occurred. Undefined method "[]" for nil:Class.
Here are the lines for that statement
153 class <<self; alias gain_exp_ce_junction gain_exp; end
154 def self.gain_exp
155 $game_party.guardian_forces.each do |actor|
156 actor.gain_ap($game_troop.ap_total)
157 if actor.learning_skills[actor.learning_skill][0] == actor.learning_skills[actor.learning_skill][1]
158 text = sprintf(Vocab:
159 $game_message.add('\.' + text)
160 end
Also I'm creating a class and gender system using events and a map. When I say yes to the class I want I get another error: Crystal Engine - GF Junction line 225: typeError occurred. Nil can't be coerced into Fixnum.
Here are the lines of this statement:
223 alias change_exp_gf_junction change_exp
224 def change_exp(exp, show)
225 value = exp - self.exp
226 @junctioned_actors.each do |actor|
227 actor.change_exp(actor.exp + (value / @junctioned_actors.size), show)
228 end
Now if I change line 225 to value = self.exp I fix the error above but then when I walk for a bit I get this error:
Crystal Engine - GF Junction line 285: NoMethodError occurred. undefined method "[]" for nil:NilClass.
Here are the lines of that statement:
279 alias refresh_ce_gf_juntion refresh
280 def refresh
281 refresh_ce_gf_juntion
282 return if @junction_skills.nil?
283 return if @junction_skills.empty?
284 return if @learning_skill == 0
285 if @junction_skills[@learning_skill][0] == @junction_skills[@learning_skill][1]
286 skills = @junction_skills.keys
287 index = skills.index(@learning_skill)
288 @learning_skill = skills[index + 1]
289 if @learning_skill.nil?
290 @junction_skills.each do |key, ap|
291 unless ap[0] == ap[1]
292 @learning_skill = key
293 return
294 end
295 end
296 end
Can someone please help me I need to get these working before I feel I can move on to continue the game I'm creating. Sorry for creating such a wall of text.
Last edited by a moderator:




