Im working on a blackjakc game. Im having trouble with reading this card. It seems to just sit there. Take a look.
WaitWindowOpen>in Buckaroo*
SetFocus>in Buckaroo*
MoveWindow>in Buckaroo*,0,0
LABEL>card_identity
GetPixelColor>323,264,redQ1
GetPixelColor>320,262,redQ2
GetPixelColor>325,268,redQ3
GetPixelColor>325,262,redQ4
if>{(%redQ1%=10066431) and (%redQ2%=10066431) and (%redQ3%=10066431 and (%redQ4=6711039)} then
slot_one_red_queen
endif
goto>card_identity
label>slot_one_red_queen
message>i foud the queen!
wait>10
----------------------------
Is it just a mistake on my end?
multiple 'if' script not workng
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm
-
- Pro Scripter
- Posts: 63
- Joined: Sat Dec 25, 2004 3:23 pm
Ya i know i changed the ')' that i missed and the % sign i missed. What do you mean by unequal ands?Anonymous wrote:If you cut and paste this from your .scp then you are missing a ) so you have an unequal number of ( and ) in this line.if>{(%redQ1%=10066431) and (%redQ2%=10066431) and (%redQ3%=10066431 and (%redQ4=6711039)}
[/quote]WaitWindowOpen>in Buckaroo*
SetFocus>in Buckaroo*
MoveWindow>in Buckaroo*,0,0
LABEL>card_identity
GetPixelColor>323,264,redQ1
GetPixelColor>320,262,redQ2
GetPixelColor>325,268,redQ3
GetPixelColor>325,262,redQ4
if>{(%redQ1%=10066431) and (%redQ2%=10066431) and (%redQ3%=10066431) and (%redQ4%=6711039)} then
slot_one_red_queen
endif
goto>card_identity
label>slot_one_red_queen
message>i foud the queen!
wait>10
Mark,
The way you have this written currently, If the colors you are seeking are not all correct matches, the script will loop indefinitely. Assuming your colors are correct you will still get the loop until you add "goto>" in front of your statement "slot_one_red_queen". "slot_one_red_queen" by itself, has no meaning.
Also, I don't think you need the word "then" in your if statement. I don't know if it is causing a problem but I'm pretty sure it's unneccesary.
Hope this was helpful.
Dick
The way you have this written currently, If the colors you are seeking are not all correct matches, the script will loop indefinitely. Assuming your colors are correct you will still get the loop until you add "goto>" in front of your statement "slot_one_red_queen". "slot_one_red_queen" by itself, has no meaning.
Also, I don't think you need the word "then" in your if statement. I don't know if it is causing a problem but I'm pretty sure it's unneccesary.
Hope this was helpful.
Dick