Hi, I'm getting this error when running a print script: ** SCRIPT ERRROR ** @Line -1:'org.jruby.exceptions.RaiseException: <script>:1762: , unexpected end-of-file ' here's my script: -----------------------------------------------------------------begin filedir = "/Volumes/LABDOCS/StudiesCurrent/FirstSteps/Studies/FS_MomResponse/OpenSHAPA/Export/" filenames = Dir.new(filedir).entries dir = File.expand_path("~/Desktop") out_file = File.new(dir + "/MomResponse_IdBidstatMomcodeMomtrans.txt", "a") for file in filenames if file.include?(".opf") and file[0].chr != '.'
id = getVariable("id") bidstat = getVariable("bidstat") momcode = getVariable("momcode") momtrans = getVariable("momtrans") for idcell in id.cells for bidstatcell in bidstat.cells if bidstatcell.onset >= idcell.onset and bidstatcell.offset <= idcell.offset if not(bidstatcell.bidstattoemo == "n") for momcodecell in momcode.cells if momcodecell.onset <= bidstatcell.onset and bidstatcell.offset <= momcodecell.offset for momtranscell in momtrans.cells if momcodecell.onset == momtranscell.onset and momcodecell.offset == momtranscell.offset out_file.syswrite (idcell.study + "t" + idcell.id + "t" + idcell.sess + "t" + idcell.educ + "t" + idcell.tdate + "t" + idcell.loctype + "t" + idcell.sex + "t" + idcell.raceb + "t" + idcell.racem + "t" + idcell.ses + "t" + idcell.mbdate + "t" + idcell.bbdate + "t" + idcell.beldate + "t" + idcell.hkdate + "t" + idcell.wdate + "t" + idcell.lang + "t" + idcell.crudate + "t" + idcell.wdate2 + "t" + idcell.mvocab + "t" + idcell.maction + "t" + idcell.mgesture + "t" + idcell.mactwobj + "t" + idcell.mpretend + "t" + idcell.mimitate + "t" + bidstatcell.ordinal.to_s + "t" + "statbid" + "t" + momcodecell.ordinal.to_s + "t" + momcodecell.objcode + "t" + momcodecell.verbcode + "t" + momcodecell.actcode + "t" + momcodecell.loc + "t" + momtranscell.ordinal.to_s + "t" + momtranscell.verbal + "t" + momtranscell.action + "n") end end end end end end end end end what am i doing wrong? something about the directory? please help! many thanks! Lana |
It's hard to tell if there are any other issues without an example file but it looks like you might have missed a few 'end' statements.
|