Sign in to follow this  
Followers 0
eekhoorn12

Array in Func

3 posts in this topic

Me again.

I've got a code working now I want to put that in a func but when I try to run it I get the error:

Line 22 (File "C:\Program Files\AutoIt3\Include\array.au3

Func_ArrayAdd(ByRef $avArray, $sValue)

Error: "Func" statement has no matching "EndFunc".

The code is in my added

SeverGegevens.au3

Share this post


Link to post
Share on other sites



The includes are User Designed Functions (UDF(s)), you can't have nested functions.

Put the Includes ouside the function.

#include <array.au3>

#include <string.au3>

#include <GUIConstants.au3>

Func Instellinge()

; All that script

EndFunc


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Me again.

I've got a code working now I want to put that in a func but when I try to run it I get the error:

Line 22 (File "C:\Program Files\AutoIt3\Include\array.au3

Func_ArrayAdd(ByRef $avArray, $sValue)

Error: "Func" statement has no matching "EndFunc".

The code is in my added

Do not put #include statements inside a FUNC..ENDFUNC .

Just move them to the top of you script.

Dutch: Je kan geen #include gebruiken binnen een Func..EndFunc, omdat in het #included bestand ook Func..EndFunc bevat en dat nu eenmaal niet mag...... Gewoon de #include regels boven aan je script plaatsen...

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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  
Followers 0