ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: 12TimesOver on April 25, 2011, 04:54:23 PM

Title: Scanjournal weirdness
Post by: 12TimesOver on April 25, 2011, 04:54:23 PM
Having some very odd results with some journal scanning, maybe someone can see something I don't.

Consider the following:

Code: [Select]
set %jindexvalue #jindex
do stuff here that puts entries in the journal

if #jindex >= %JindexValue
   {
   for %i %jindexvalue #jindex
      {
      scanjournal %i
      if :_The_Lock_Quickly_Yields in #journal || if This_does_not_appear_to_be_locked in #journal
         set %unlocked #TRUE
         }
      }
So, when this runs the value of #journal is You_are_unable_to_pick_the_lock BUT for some reason, the "if" statement is coming up as true thus setting %unlocked to #TRUE even though neither of those strings are in #journal. I have even done this in Luna hitting F7 so the value of #jindex had increased by 10 or 11 and this thing runs fine through every frigging line until it hits You_are_unable_to_pick_the_lock.

I'm going nuts here! lol.

X
Title: Re: Scanjournal weirdness
Post by: Scrripty on April 25, 2011, 05:20:16 PM
Where is %unlocked getting set back to #false?
Title: Re: Scanjournal weirdness
Post by: 12TimesOver on April 25, 2011, 05:56:19 PM
Where is %unlocked getting set back to #false?
Ah good q, I only posted the portion of the loop that was applicable. It gets set to #FALSE at the beginning of the sub before entering a repeat/until that loops until the match is made in the journal.

Just very strange...I'm obviously missing somehting or there is something buggy with scanjournal.

X
Title: Re: Scanjournal weirdness
Post by: Endless Night on April 25, 2011, 08:42:01 PM
YOUR GOING TO KICK YOURSELF

if :_The_Lock_Quickly_Yields in #journal || if This_does_not_appear_to_be_locked in #journal

Also you {} count dont match... and what Twinkle McNugget said so i would change it to .. (Saves on lines for simple logic settings)

Code: [Select]
set %unlocked _The_Lock_Quickly_Yields in #journal || This_does_not_appear_to_be_locked in #journal
Title: Re: Scanjournal weirdness
Post by: Dixie Wrecked on April 25, 2011, 08:51:51 PM
YOUR GOING TO KICK YOURSELF

if :_The_Lock_Quickly_Yields in #journal || if This_does_not_appear_to_be_locked in #journal

Also you {} count dont match... and what Twinkle McNugget said so i would change it to .. (Saves on lines for simple logic settings)

Code: [Select]
set %unlocked _The_Lock_Quickly_Yields in #journal || This_does_not_appear_to_be_locked in #journal

I was just about to post about the extra 'if' too.  But his {} do match, they just don't line up (that was the first thing I thought was the problem)...
Title: Re: Scanjournal weirdness
Post by: Endless Night on April 25, 2011, 08:53:21 PM
my bad must be tired the open and close {}  count does match thier 2 of each... good night all.
Title: Re: Scanjournal weirdness
Post by: 12TimesOver on April 26, 2011, 01:53:59 AM
The bracket thing in there is just because I copy/pasted pieces of the actual code so I'm good on brackets BUT OMFG WTH!!?!?!?! I can't believe how many times I frigging looked at that code and didn't even look at syntax because I was so focused on the string matching and overall logic issues, ROFL! Thanks a lot guys, it's one of those things where when I look at something too much I can't even see it anymore.

Let the kicking of myself commence...

X
Title: Re: Scanjournal weirdness
Post by: TrailMyx on April 26, 2011, 07:38:01 AM

Let the kicking of myself commence...


Lol, classic.
Title: Re: Scanjournal weirdness
Post by: gimlet on April 26, 2011, 08:08:26 AM
Polishes THE BIG SHOE
Title: Re: Scanjournal weirdness
Post by: Endless Night on April 26, 2011, 11:52:05 AM
what is this a good kicking thing...  (rummages in garaged looking for those old steel toed Dr Martins i once owned)
Title: Re: Scanjournal weirdness
Post by: 12TimesOver on April 26, 2011, 11:52:47 AM
what is this a good kicking thing...  (rummages in garaged looking for those old steel toed Dr Martins i once owned)

LOL hey I used to have a pair of those!! That's what ALL the non-conformists used to wear!

;)
Title: Re: Scanjournal weirdness
Post by: Endless Night on April 26, 2011, 12:50:54 PM
what is this a good kicking thing...  (rummages in garaged looking for those old steel toed Dr Martins i once owned)

LOL hey I used to have a pair of those!! That's what ALL the non-conformists used to wear!

;)

yup UNIFORM non-conformity...  funny even when rebelling we have to become a herd.