Advertisement
Guest User

Problème de PathFinding sur un évent

a guest
Jan 17th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. Après avoir exécuter un PathFinding sur un évent (via la commande pour déplacer un évent/le joueur), le jeu plante.
  2.  
  3. Voici l'erreur :
  4. [code]
  5. ================================Erreur de script================================
  6. Message :
  7. undefined method `each' for "endin":String
  8.  
  9. Type : NoMethodError
  10. Script : 00650 MapSystem/00700 Pathfinding.rb (PSDK)
  11. Ligne : 447
  12. Date : 17/01/2020 17:03:44
  13. Logiciel : Pokémon SDK 24.48
  14. ===================================Backtraces===================================
  15. [21] : 00650 MapSystem/00700 Pathfinding.rb (PSDK) | ligne 447 stucked?
  16. [20] : 00650 MapSystem/00700 Pathfinding.rb (PSDK) | ligne 385 update_watch
  17. [19] : 00650 MapSystem/00700 Pathfinding.rb (PSDK) | ligne 313 update
  18. [18] : 00650 MapSystem/00700 Pathfinding.rb (PSDK) | ligne 117 update
  19. [17] : 00650 MapSystem/00600 Game_Map.rb (PSDK) | ligne 397 update
  20. [16] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 67 update
  21. [15] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 63 loop
  22. [14] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 63 update
  23. [13] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 36 main
  24. [12] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 31 loop
  25. [11] : 01400 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 31 main
  26. [10] : tools/GameLoader/Z_main.rb (PSDK) | ligne 10 <top (required)>
  27. [9] : tools/GameLoader/3_load_extensions.rb (PSDK) | ligne 35 rgss_main
  28. [8] : tools/GameLoader/50_load_game_uncompiled.rb (PSDK) | ligne 31 <top (required)>
  29. [7] : /lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb (ruby) | ligne 59 require
  30. [6] : /lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb (ruby) | ligne 59 require
  31. [5] : ScriptLoad.rb (PSDK) | ligne 128 load_tool
  32. [4] : tools/GameLoader/Z_load_uncompiled.rb (PSDK) | ligne 8 <top (required)>
  33. [3] : /lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb (ruby) | ligne 59 require
  34. [2] : /lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb (ruby) | ligne 59 require
  35. [1] : ScriptLoad.rb (PSDK) | ligne 128 load_tool
  36. [0] : Game.rb (RMXP) | ligne 16 <main>
  37. ===================================Fin du log===================================
  38. [/code]
  39.  
  40. Voici le def contenant la ligne en question :
  41. [code]
  42. def stucked?
  43. # Get the data
  44. route = @character.path
  45. route_index = @character.move_route_index
  46. x = @character.x
  47. y = @character.y
  48. z = @character.z
  49. b = @character.__bridge
  50.  
  51. # Iterate commands to the last one, which is Lentgh - 2 (considering the empty command at end)
  52. route[route_index..[route.length - 2, route_index + OBSTACLE_DETECTION_RANGE - 1].min]&.each do |command| # Le problème est à cette ligne
  53. return true unless @cursor.sim_move?(x, y, z, command.code, b)
  54.  
  55. x = @cursor.x
  56. y = @cursor.y
  57. z = @cursor.z
  58. b = @cursor.__bridge
  59. end
  60. return false
  61. end
  62. [/code]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement