Jump to content
Sign in to follow this  
TheRock

Error at easy Function

Recommended Posts

TheRock

#include <INet.au3>
#include <String.au3>
#include <array.au3>

Func find($a,$b,$c)
$x = _StringBetween($a, $b, $c)
$1 = $x[0]
EndFunc

Error is :

==> Subscript used with non-Array variable.:

$1 = $x[0]

$1 = $x^ ERROR

:)

Can someone help me please ??

At vista i have no error

but at xp i have this error :)

Share this post


Link to post
Share on other sites
Jos

Test @error if _StringBetween() was successful or post a code snippet we can test with as the posted doesn't show anything really since you do not specify the values with which the Func is called.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                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
trung0407

It means the func return error (no match) -.-

You should always put an error handler

If @error then Return
Edited by trung0407

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.