Script Syntaxerror

Started by igorlipemoreno, May 02, 2015, 09:52:01 pm

Previous topic - Next topic

igorlipemoreno

May 02, 2015, 09:52:01 pm Last Edit: May 04, 2015, 07:15:17 pm by Ryex
Can someone help me because the script ta Giving use Error only the blizz abs and toons
this script that ta giving error http://forum.chaos-project.com/index.php?topic=9983.new
module Xelias

   def self.ers_config(item)
   # weapon configuration
   if item.is_a?(RPG::Weapon)
     case item.id
     # START Weapon Configuration
     when 2 then return [100] <<< ERROR SYNTAX
     # END Weapon Configuration
     end
   elsif item.is_a?(RPG::Armor)
     case item.id
     # START Armor Configuration
     when 2 then return [100]
     # END Armor Configuration
     end
   end
   return [100]
 end

 def self.req_skill(id)
   case id
     # START Skill Configuration
     when 8 then return 101
   end
   return
 end
 
end

Sylphe

I think it is  when 2 then return 100 ... and not [100]

Also...  def self.methodName   ??? WTF never saw that before xD
blindly follow his heart can lead to the loss

Sylphe, descendant of Zoldik Family.
Quote from: TedBearTRY KEEP UP

KK20

According to the script, it needs to be in an array. Don't know why it was written like that though--it could have easily just been a stand-alone number. It also doesn't make sense why that line would be giving a syntax error. I would have to see all the scripts in the project to draw a conclusion.

def self.<method> is syntax for defining Module methods. Classes use def <method>.
Modules are best used for configuration in scripts. While you could use a class to do the same thing, you would need to initialize an instance of the class every time you wanted to use a method from it. Meanwhile. modules can be accessed and used anywhere.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Sylphe

Oh ok I didn't know, maybe I saw that but didn't notice  ! xD

Also I think you should create the array then return the variable containing the array then see if the error still there.
something like :
array = [100]
...
when 1 then return array
blindly follow his heart can lead to the loss

Sylphe, descendant of Zoldik Family.
Quote from: TedBearTRY KEEP UP

ForeverZer0

Why do you not just tell us which line is causing the syntax error? The cursor will take you there after the error occurs and you open the script editor.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

igorlipemoreno

thank people Discover the poblema as I am Brazilian I am using hum hum translator paragraph TALK WITH voces script I was doing Copying browser which I use Baidu If not THAT and Some Other browsers break the text line agora copied with internet explorer and fucionou Very obg perfectly the script and I 'm sorry Do you guys lose pace :^_^':

Sylphe

blindly follow his heart can lead to the loss

Sylphe, descendant of Zoldik Family.
Quote from: TedBearTRY KEEP UP

ForeverZer0

The translation just isn't working for me.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

igorlipemoreno

Getting THAT USE as que features Error place as id Everything just right single thing I have to and Blizz abs toons and with activated equipament_requeriment