Author Topic: Frustrated! Problem with logical operator failing in EUO  (Read 1983 times)

0 Members and 1 Guest are viewing this topic.

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Frustrated! Problem with logical operator failing in EUO
« on: April 16, 2012, 03:34:35 PM »
0
Please look at the attached screenshot and tell me...WHY AM I ON THIS LINE?!

If %bottomrow = true, I should never get here!

ARGH!!!!!!!!!

There are 1 attachment(s) in this post. You must register and post an acceptable introduction to download
Logical Problem.jpg

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13304
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #1 on: April 16, 2012, 03:38:50 PM »
0
Check your braces.  You may have a brace imbalance.  Try running the syntax checker from SUO.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #2 on: April 16, 2012, 03:53:05 PM »
0
Yep, that was it.  It's proving much harder to keep track of all my branch and sequels than I thought, even for a 3x3 puzzle.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13304
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #3 on: April 16, 2012, 03:57:35 PM »
0
Don't worry, I've fallen in that particular hole many times.  Part of the reason that inspired me to do the SUO thing.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #4 on: April 17, 2012, 04:45:48 AM »
0
Don't worry, I've fallen in that particular hole many times.  Part of the reason that inspired me to do the SUO thing.
I would venture to bet that this is probably the number one syntactical stumper for newb's and vet's alike - probably in just about any applicable language really. Thus why a decent parser is so bitchin' ;)

Imagine trying to figure that out by hand with tens of thousands of lines of code? I don't care if you're the inventor of C++, there ain't no way you're dealing with that manually and still raising children and having sex from time to time. Nope, it ain't happening.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #5 on: April 17, 2012, 02:05:33 PM »
0
In case anyone cares, I've decided to scrap my current brute force logic approach to this process, and go with a rules-based one instead.  It will take a really long time for me to code it, though, so in the meantime I've been using a version of the army to keep my main character healed.

I can do individual puzzles faster that I can code a solution, but it makes me sad that a prime scripting opportunity is being lost...perhaps if someone else wants to take it on, I can provide my work thus far.

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #6 on: April 17, 2012, 09:26:30 PM »
0
yeah, when you have a bracket imbalance, the if statment just reads the first open bracket.

set %Boobies So_So
if %Boobies = magnificent
{
Display WOOT


Because there is no CLosing bracket, the if statment will only perform the Open Bracket if its true, so obviously it just performs everything else
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13304
  • Activity:
    0.6%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #7 on: April 18, 2012, 07:29:56 AM »
0
I can relate to your excellent code example.  :)
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Frustrated! Problem with logical operator failing in EUO
« Reply #8 on: April 18, 2012, 02:43:14 PM »
0
I read "boobies" and immediately went off to find some.

Damn.  Did it again.

Tags: