Shineebony 2 Posted December 14, 2020 Hello, I am trying to apply a Ninja Throw Script created by Locke, and when I try adding it and play running the game, I receive a syntax error. I'm sorry but could someone please inform me what is causing this error? Script: line 67: Syntax Error occurred. unexpected tLBRACK, expecting ']' [skill.id]]) EDIT: Oops I didnt mean to post my question here. My apologies but could someone please abolish or lock this post? Share this post Link to post Share on other sites
PhoenixSoul 1,404 Posted December 15, 2020 I am well aware of this particular script as it was made for me, well, not exclusively but was made with myself being the first copy recipient. Since that script requires the modifications done in-script, I need to see the full script in order to diagnose the issue. Also, you posted in the proper place. Share this post Link to post Share on other sites
Shineebony 2 Posted December 15, 2020 =begin Ninja Throw script by LockeZ Allows any skill to consume either an item or a weapon Utilize for whatever you want, no credit necessary This script does not use notetags, because screw you. Instead, near the top of the script is a place to put lines indicating which skills require which items/weapons. There are some example lines which you may delete. This script could also be used for any other type of skill which consumes an item, such as gun or bow skills that require ammo, or spells that require reagents. Weapons which are equipped cannot be thrown. If you use this script to make a skill use up an item, it can also still cost MP or TP like any other skill. It is recommended that you name the skills the same names as the weapons/items being thrown, since the cost is not shown. If you want to show the cost, just put it in the skill's name. Unlike Final Fantasy, skills appear in your skill list whether you own the item or not, they're just grayed out if you don't have enough items to throw them. This allows you to teach the player these skills any way you want, so for example you might require a character to pay gold at a trainer to learn the ability to throw mythril swords. If you want to dynamically add and remove skills based on the player's inventory, like Final Fantasy, then do that your own damn self with a common event. Copy and paste the following @ninja_throw_skill_items[x] = v @ninja_throw_skill_weapons[x] = v where x is the ID of the skill and v is the ID of the item/weapon =end class Game_BattlerBase attr_accessor :ninja_throw_skill_items attr_accessor :ninja_throw_skill_weapons alias ninja_throw_initialize initialize def initialize @ninja_throw_skill_items = {} @ninja_throw_skill_weapons = {} # Add your game's skills that use up items below this line. # Examples follow. @ninja_throw_skill_items[30] = 3 # Skill #30 requires item #3 @ninja_throw_skill_items[31] = 5 # Skill #31 requires item #5 @ninja_throw_skill_weapons[32] = 5 # Skill #32 requires weapon #5 ninja_throw_initialize end alias ninja_throw_skill_cost_payable? skill_cost_payable? def skill_cost_payable?(skill) if @ninja_throw_skill_items[skill.id] != nil unless $game_party.has_item?($data_items[@ninja_throw_skill_items[skill.id]]) return false end end if @ninja_throw_skill_weapons[skill.id] != nil unless $game_party.has_item?($data_weapons[@ninja_throw_skill_weapons [skill.id]]) return false end end ninja_throw_skill_cost_payable?(skill) end alias ninja_throw_pay_skill_cost pay_skill_cost def pay_skill_cost(skill) if @ninja_throw_skill_items[skill.id] != nil $game_party.lose_item($data_items[@ninja_throw_skill_items[skill.id]], 1) end if @ninja_throw_skill_weapons[skill.id] != nil $game_party.lose_item($data_weapons[@ninja_throw_skill_weapons[skill.id]], 1) end ninja_throw_pay_skill_cost(skill) end end Share this post Link to post Share on other sites
Rikifive 3,411 Posted December 15, 2020 Where you have this: if @ninja_throw_skill_weapons[skill.id] != nil unless $game_party.has_item?($data_weapons[@ninja_throw_skill_weapons [skill.id]]) return false end end backspace the [skill.id]]) line into the previous one to get this: if @ninja_throw_skill_weapons[skill.id] != nil unless $game_party.has_item?($data_weapons[@ninja_throw_skill_weapons[skill.id]]) return false end end Not sure why, nor how that line got split that way in the first place, just merge it back. Also I have moved your thread to appropriate place, no worries, it's all fine. 2 Share this post Link to post Share on other sites
Shineebony 2 Posted December 15, 2020 Wow I feel so silly thank you so much. This worked briliantly 2 Share this post Link to post Share on other sites
PhoenixSoul 1,404 Posted December 15, 2020 I know why that happened. It's this evil side effect of a very useful-otherwise feature of notepad called Word Wrap. 1 Share this post Link to post Share on other sites