Jump to content

Parse Error? I'm very new plz help


Guest Peppito20
 Share

Recommended Posts

Guest Peppito20

Ok, i've already seached the forums and it seems to me that parse errors are unique to the script, please i'm very new at this and i know nothing of writing scripts. I'm trying to get this script to work for an MMORPG. Well, here it is...

Sleep(250); 
If PixelGetColor(22,994) = 16777215 AND PixelGetColor(108,996) = 16777215 AND PixelGetColor(228,997) = 16777215 Then 
AutoItSetOption("SendKeyDelay", 40); 
Sleep(Random(3000,3200)); 
Send("{ENTER}"); 
Sleep(5400); 
EndIf 

If PixelGetColor(43,997) = 16777215 AND PixelGetColor(83,998) = 16777215 AND PixelGetColor(175,999) = 16777215 Then 
Sleep(Random(5100,5400));You lost your catch. Finish and speed things up a little. 
$event = 1; 
EndIf 

If PixelGetColor(37,1000) = 16777215 AND PixelGetColor(77,1000) = 16777215 AND PixelGetColor(180,998) = 16777215 Then 
Sleep(Random(5100,5400));You didn't catch anything. Finish and speed things up a little. 
$event = 1; 
EndIf 

If PixelGetColor(47,1000) = 16777215 AND PixelGetColor(142,999) = 16777215 AND PixelGetColor(330,997) = 16777215 Then 
$nobait = 1;You ran out of bait so let's get ready to change it. 
EndIf 

If PixelGetColor(43,995) = 16777215 AND PixelGetColor(71,997) = 16777215 AND PixelGetColor(84,995) = 16777215 Then 
autosort() 
Sleep(Random(2100,2200)); 
$event = 1;You caught something so now autosort, sleep a bit, and finish the event. 
EndIf 


$failsafe = $failsafe+1; 
If $failsafe = 175 Then 
$event = 1; 
EndIf 

Until $event = 1 

sleep(2000); 

If $nobait = 1 Then 
Send("!2");change bait 
EndIf 

WEnd 

Func autosort() 
Sleep(9000); 
AutoItSetOption("SendKeyDelay", 0235); 
Send ("!i"); 
Sleep(0250); 
Send ("{NUMPADADD}"); 
Sleep (0250); 
Send ("{ENTER}"); 
sleep(0350); 
Send ( "a" ); 
sleep(0350); 
Send ("{ENTER}"); 
sleep(0250); 
Send ("{ESCAPE}"); 
sleep(0250); 
Send ("{ESCAPE}"); 
Sleep (0250); 
EndFunc

thats it.

the error message reads...

Line 1 (File "C:\......ffaf.au3")

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fcharset0 Times New Roman;}{\f2\swiss\fcharset 0 Arial;}} ^Error

Error: unable to parse line

Please, i have no idea what this means and i'd realy love to get it working. Sorry to post up so much space and plz be nice(first post).

Thank you all in advance

Link to comment
Share on other sites

nothing strange about the first line in your text, you might want to make sure it is saved in the proper character set.

Occationally I save files in the wrong character set. So when it reads the file, it is kinda jiberish. Or say you save it in other formats, like RTF.

This part tends to make me think the file was saved in Rich text format instead of plain text.

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fcharset0 Times New Roman;}{\f2\swiss\fcharset 0 Arial;}}
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

Guest Peppito20

hey thanks man that Rich Text fixed my problem but now ofcourse something elese is standing in my way, yes another ERROR.

here is the message, same exact script:

Line 35 (File "C:\....ffaf.au3."):

Until $event = 1

Error: "until" statement with no matching "Do" statement.

any worst of wisdom for this one?

Link to comment
Share on other sites

  • Developers

hey thanks man that Rich Text fixed my problem but now ofcourse something elese is standing in my way, yes another ERROR. 

here is the message, same exact script:

Line 35 (File "C:\....ffaf.au3."):

Until $event = 1

Error: "until" statement with no matching "Do" statement.

any worst of wisdom for this one?

<{POST_SNAPBACK}>

This is the output when you run Tidy... does that make it more clear for you ?

You are missing a DO and an While statement somewhere :

Sleep(250); 
If PixelGetColor(22, 994) = 16777215 And PixelGetColor(108, 996) = 16777215 And PixelGetColor(228, 997) = 16777215 Then 
   AutoItSetOption("SendKeyDelay", 40); 
   Sleep(Random(3000, 3200)); 
   Send("{ENTER}"); 
   Sleep(5400); 
EndIf 

If PixelGetColor(43, 997) = 16777215 And PixelGetColor(83, 998) = 16777215 And PixelGetColor(175, 999) = 16777215 Then 
   Sleep(Random(5100, 5400));You lost your catch. Finish and speed things up a little. 
   $EVENT = 1; 
EndIf 

If PixelGetColor(37, 1000) = 16777215 And PixelGetColor(77, 1000) = 16777215 And PixelGetColor(180, 998) = 16777215 Then 
   Sleep(Random(5100, 5400));You didn't catch anything. Finish and speed things up a little. 
   $EVENT = 1; 
EndIf 

If PixelGetColor(47, 1000) = 16777215 And PixelGetColor(142, 999) = 16777215 And PixelGetColor(330, 997) = 16777215 Then 
   $NOBAIT = 1;You ran out of bait so let's get ready to change it. 
EndIf 

If PixelGetColor(43, 995) = 16777215 And PixelGetColor(71, 997) = 16777215 And PixelGetColor(84, 995) = 16777215 Then 
   autosort() 
   Sleep(Random(2100, 2200)); 
   $EVENT = 1;You caught something so now autosort, sleep a bit, and finish the event. 
EndIf 


$FAILSAFE = $FAILSAFE + 1; 
If $FAILSAFE = 175 Then 
   $EVENT = 1; 
EndIf 

;### Tidy Error: next line creates a negative tablevel.
;### Tidy Error: next line creates a negative tablevel for the line after it.
Until $EVENT = 1 

Sleep(2000); 

If $NOBAIT = 1 Then 
   Send("!2");change bait 
EndIf 

;### Tidy Error: next line creates a negative tablevel.
;### Tidy Error: next line creates a negative tablevel for the line after it.
Wend 

Func autosort() 
   Sleep(9000); 
   AutoItSetOption("SendKeyDelay", 0235); 
   Send("!i"); 
   Sleep(0250); 
   Send("{NUMPADADD}"); 
   Sleep(0250); 
   Send("{ENTER}"); 
   Sleep(0350); 
   Send("a"); 
   Sleep(0350); 
   Send("{ENTER}"); 
   Sleep(0250); 
   Send("{ESCAPE}"); 
   Sleep(0250); 
   Send("{ESCAPE}"); 
   Sleep(0250); 
EndFunc  ;==>autosort

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...