Jump to content

Array in Func


Recommended Posts

  • Moderators

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

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.

Link to comment
Share on other sites

  • Developers

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

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...