Author Topic: Error with if  (Read 4348 times)

0 Members and 1 Guest are viewing this topic.

Offline exmikeTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • exmike has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Error with if
« on: November 27, 2011, 12:11:42 PM »
0
Please check and tell where error?
Code: [Select]
mainloop:
gosub checksub

sub CheckSub
contpos 0 0
wait 25
savePix 258 167 0
wait 10
if #pixcol = 2705961 {
display ok1
wait 10
} else {
display Exiting
}

wait 10
SavePix 113 167 0
wait 10
if #pixcol = 8710077 {
display Ok
wait 10
} else {
display Exiting2
}
wait 10
savepix 228 240 0
if #pixcol = 2173225 {
display ok3
wait 10
} else {
display exiting3
}
return


if it running it shows Ok1 and Exiting, ok2 and exit\k3 and exit..
how to fix?

Offline Khameleon

  • Script Tester - Team Leader
  • Elite
  • *
  • *
  • Posts: 2574
  • Activity:
    0%
  • Reputation Power: 30
  • Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!Khameleon is a rising star!
  • Gender: Male
  • Respect: +238
  • Referrals: 0
    • View Profile
Re: Error with if
« Reply #1 on: November 27, 2011, 02:14:02 PM »
0
we see your willing participate and it looks like you are willing to learn more, please check back with your original new member introduction post to lift your restricted Membership before further postings....



Thank you...
    Not the management.....

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: Error with if
« Reply #2 on: November 28, 2011, 02:58:19 AM »
0
Check the placement of your brackets. Also, although you CAN use them, you don't HAVE to use brackets with if/else if there is only 1 line to process:

Code: [Select]
if #pixcol = 2705961 ;statement requires brackets since there is two lines to process
   {
   display ok1
   wait 10
   }
else ;brackets are optional since there is only one line
   display Exiting

And yes, please beef up the intro a little bit, unless you don't mind being restricted...

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 exmikeTopic starter

  • Jr. Member
  • **
  • Posts: 10
  • Activity:
    0%
  • Reputation Power: 1
  • exmike has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Error with if
« Reply #3 on: November 28, 2011, 04:35:21 AM »
0
Quote
And yes, please beef up the intro a little bit, unless you don't mind being restricted..
I already wrote in Introduction post, but i have a status :(
How to change it?:(

Sorry because i from other country, and not very good speak in to english :(

Offline Cerveza

  • Hacksimus Maximus
  • Scripthack
  • *
  • Posts: 5857
  • Activity:
    0%
  • Reputation Power: 80
  • Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!Cerveza is awe-inspiring!
  • Gender: Male
  • So... Hows that Hopey-Changey thing working out?
  • Respect: +403
  • Referrals: 11
    • View Profile
Re: Error with if
« Reply #4 on: November 28, 2011, 05:15:45 AM »
0
Quote
And yes, please beef up the intro a little bit, unless you don't mind being restricted..
I already wrote in Introduction post, but i have a status :(
How to change it?:(

Sorry because i from other country, and not very good speak in to english :(

#1 - read THE RULES
#2 - read HOW TO MAKE AN INTRO
#3 - read GOOD INTRO EXAMPLES

Just do that before you post anything else.
XXXXXXXXXX________________________________________] 20%
I've forgotten more about this game then most people will ever know.
Thank you for controlling your children. Their manners reflect your love for them.
Give a man a fish and you feed him for a day. Don't teach a man to fish, and you feed yourself. He's a grown man. Fishing's not that hard.

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Error with if
« Reply #5 on: November 28, 2011, 05:29:30 AM »
0
Quote
And yes, please beef up the intro a little bit, unless you don't mind being restricted..
I already wrote in Introduction post, but i have a status :(
How to change it?:(

Sorry because i from other country, and not very good speak in to english :(
From where are you from? maybe some member coming from the same Country and could translate you what you will have to do.
Else i would prefer using Google Translator they are quite good..

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Error with if
« Reply #6 on: November 28, 2011, 07:41:12 AM »
0
Check the placement of your brackets. Also, although you CAN use them, you don't HAVE to use brackets with if/else if there is only 1 line to process:

What 12X is bringing up is one of a 100 little syntactical formatting annoyances you'll run into when you script in EUO.  Best thing you can do is look at how other people have their code formatted and try and follow that convention.  Also, code in small bits and test as you go.  If you try and code a huge block of code and you have a syntactical error, you'll spend countless hours trying to find it since EUO doesn't fail execution when it runs into a syntax error.   
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline Crome969

  • Elite
  • *
  • *
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Error with if
« Reply #7 on: November 28, 2011, 08:28:37 AM »
0
If you dont know how to check all the Logical Brackets,you have 3 Opinions:

Best Case :
Quote
And yes, please beef up the intro a little bit, unless you don't mind being restricted..
I already wrote in Introduction post, but i have a status :(
How to change it?:(

Sorry because i from other country, and not very good speak in to english :(

#1 - read THE RULES
#2 - read HOW TO MAKE AN INTRO
#3 - read GOOD INTRO EXAMPLES

Just do that before you post anything else.
And get Access to Scriptuo Development Tool for Easyuo.
Other Okay Case:
Use Notepad++ and get the Bracket marks
Baddest Case: Use Easyuo Only

Now it really depending all on you.

Crome

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Error with if
« Reply #8 on: November 28, 2011, 12:47:47 PM »
0



 ​_██​_
(ಠ​_ృ)
I do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Tags: