Jump to content

_StringBetween doesn't work for the second time


magiccc
 Share

Recommended Posts

Hey guys!

This script was a no parameter function and it worked just like that, then i rebuilt the script, to do the function for multiple variables with a For loop.

Im getting the right strings out of the array tho with the debugging MsgBoxes, and the _StringBetween works fine for the first time in the script, but when it gets to the DO part, it gives an error:

update: something goes wrong when im getting the source code again in the DO part, it probably cant find the strings im referring to, but it worked when i didnt use the for loop to change the function variables

(85) : ==> Subscript used on non-accessible variable.:
Until $1eveskenyer[0] = 3000
Until $1eveskenyer^ ERROR

 

Quote


    Local $source = _IEBodyReadHTML($asd)
    Local $melyikselect = _IEGetObjByName($asd,'melyik')
    If _IEFormElementOptionSelect ($melyikselect, $item[1]) <> 0 Then
        MsgBox(0,'','item is available')

        Local  $1eveskenyer = _StringBetween($source, $item[2] ,$item[3])
        If $1eveskenyer[0] <> 3000 Then

            MsgBox(0,'','item value is not 3000, its ' & $1eveskenyer[0] &'instead, attempting to buy')
            eveskenyerselect($item)
            Do

                MsgBox(0,'','Now going to buy it because price is not 3000')
                eveskenyerbuy()
                Wait()
                Local $source = _IEBodyReadHTML($asd)
                Local  $1eveskenyer = _StringBetween($source, $item[2] ,$item[3])
                MsgBox(0,'',$item[2] & $item[3])
                Wait()
           Until $1eveskenyer[0] = 3000


            MsgBox(0,'','Dont have to buy it again')
            MsgBox(0,'','putting it back at max price')
            eveskenyervissza($item)


        Else
            MsgBox(0,'','the item value is 3000%')
        EndIf
    Else
        MsgBox(0,'','the item is not on the market')
    EndIf

 

 

Edited by magiccc
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...