Jump to content
Sign in to follow this  
Noobcube

Script

Recommended Posts

Noobcube

ive written my script but i get a message saying either

WEnd

no matching while statments

or one with Endswitch

if i upload my script here could some cleaver person give it a once over and see if you can see the problem?

Thanks ;)

Share this post


Link to post
Share on other sites
dbzfanatic

Scite will tell you the line number of your error. Read the output carefully and if you can't find it post your script between code or autoit tags instead of uploading.

Share this post


Link to post
Share on other sites
mscreffcs

ive written my script but i get a message saying either

WEnd

no matching while statments

or one with Endswitch

if i upload my script here could some cleaver person give it a once over and see if you can see the problem?

Thanks ;)

Check for missing closing WEnd tag! :D

OR you might forgot to close other closing tag inside the WEnd closing tag.

Hope this helps!

Share this post


Link to post
Share on other sites
enaiman

Sometimes a missing closing bracket ) might generate the same error.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites
AlmarM

Hello,

We can't fix anything if we dont see it.

Could you please show us your code?

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
Noobcube

Hello,

We can't fix anything if we dont see it.

Could you please show us your code?

AlmarM

sorry for late reply just got in from work

http://www.megaupload.com/?d=6C2F1IFK

thats link to my script

i uploaded it becuase its too long to post here

but i think the problem lies between lines 89-399

if i remove the runbutton section it works

but i cant see anything wrong( yes im noob with write codes its mostly copy pasted and changed al il bit lol)

Share this post


Link to post
Share on other sites
Noobcube

sorry for late reply just got in from work

http://www.megaupload.com/?d=6C2F1IFK

thats link to my script

i uploaded it becuase its too long to post here

but i think the problem lies between lines 89-399

if i remove the runbutton section it works

but i cant see anything wrong( yes im noob with write codes its mostly copy pasted and changed al il bit lol)

anyone checked it out^^?

Share this post


Link to post
Share on other sites
LongBowNZ

Please don't bump your thread within 24 hours of your last bump/post.

People will get to your question when they get to it ;)

Share this post


Link to post
Share on other sites
Noobcube

Please don't bump your thread within 24 hours of your last bump/post.

People will get to your question when they get to it ;)

sorry :D

Share this post


Link to post
Share on other sites
Noobcube

Have you run your script through Tidy(Ctrl+T)?

Jos

it just swops lines around for me

back and forward lol

Share this post


Link to post
Share on other sites
Jos

it just swops lines around for me

back and forward lol

It Indents your code making it easier to see mistakes, but you didn't get any errors reported and inserted in your code? Edited by Jos

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

Share this post


Link to post
Share on other sites
Noobcube

It Indents your code making it easier to see mistakes, but you didn't get any errors reported and inserted in your code?

all ctrl+t does is swop

While 1

$nMsg = GUIGetMsg()

into

$nMsg = GUIGetMsg()

While 1

lol

Share this post


Link to post
Share on other sites
Jos

THere is plenty of info for you to work on when you look at these results:

Tidy Output:

TBot V1.01.au3(101) : ### Tidy Error -> "case" Not closed before "Func" statement.
TBot V1.01.au3(101) : ### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
TBot V1.01.au3(379) : ### Tidy Error -> "endfunc" is closing previous "if" on line 202
TBot V1.01.au3(388) : ### Tidy Error -> "func" Not closed before "Func" statement.
TBot V1.01.au3(388) : ### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
TBot V1.01.au3(399) : ### Tidy Error -> "func" Not closed before "Func" statement.
TBot V1.01.au3(399) : ### Tidy Error -> "func" cannot be inside any IF/Do/While/For/Case/Func statement.
TBot V1.01.au3(416) : ### Tidy Error -> "wend" is closing previous "case" on line 408
TBot V1.01.au3(418) : ### Tidy Error -> "endswitch" is closing previous "func" on line 99
TBot V1.01.au3(16) : ### Tidy Error -> "case" is never closed in your script.
TBot V1.01.au3(15) : ### Tidy Error -> "switch" is never closed in your script.
TBot V1.01.au3(13) : ### Tidy Error -> "while" is never closed in your script.
!> there were  12 error(s) encountered. look in your source for:### Tidy Error:

AU3Check output

TBot V1.01.au3(101,4) : ERROR: missing EndSwitch.
            Func
            ^
TBot V1.01.au3(15,14) : REF: missing EndSwitch.
    Switch $nMsg
    ~~~~~~~~~~~~^
TBot V1.01.au3(101,4) : ERROR: missing Wend.
            Func
            ^
TBot V1.01.au3(13,1) : REF: missing Wend.
While
^
TBot V1.01.au3(206,21) : ERROR: syntax error
                    Endsleep(1500) If
                    ~~~~~~~~~~~~~~~^
TBot V1.01.au3(94,36) : ERROR: TogglePause(): undefined function.
            HotKeySet("{end}", "TogglePause")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
TBot V1.01.au3(95,35) : ERROR: Terminate(): undefined function.
            HotKeySet("+{enD}", "Terminate")
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
TBot V1.01.au3(206,19) : ERROR: Endsleep(): undefined function.
                    Endsleep(1500)
                    ~~~~~~~~~~~~~^
TBot V1.01.au3 - 6 error(s), 0 warning(s)

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

Share this post


Link to post
Share on other sites
Noobcube

ok thanks ill have a look

that look like a lot of work ;) lol

Share this post


Link to post
Share on other sites
Jos

all ctrl+t does is swop

While 1

$nMsg = GUIGetMsg()

into

$nMsg = GUIGetMsg()

While 1

lol

Line 13 and 14 are not swapped when I run it...

Anyways... your code needs some work.


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

Share this post


Link to post
Share on other sites
ResNullius

Line 13 and 14 are not swapped when I run it...

Anyways... your code needs some work.

I think what the OP meant was that CTRL-T isn't running Tidy, it's just performing the default SciTE action of swapping line positions at the cursor.

@Noobcube

In SciTE go to your "Tools" menu and look for "Tidy AutoIt Source", should also show you what the shortcut key is set to for your installation.

Share this post


Link to post
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
Sign in to follow this  

×