Jump to content
Sign in to follow this  
Astania

Editing - Script via autov3 re post

Recommended Posts

Astania
Edited by Astania

Share this post


Link to post
Share on other sites
Jos

Assume $res = 0 thus all those variables within the IF are not defined.

Func levelstat()
    $oFrame = _IEFrameGetCollection($oie, 1)
    $res = _StringBetween(_IEBodyReadHTML($oFrame), "<A href='", "(")
    If $res <> 0 Then
        $jStr = $res[0] & '("v",1,0,0)'
        $jDex = $res[0] & '("v",2,0,0)'
        $jNtl = $res[0] & '("v",3,0,0)'
        $jWis = $res[0] & '("v",4,0,0)'
        $jVit = $res[0] & '("v",5,0,0)'
        $jAll = $res[0] & '("v",6,0,0)'
    EndIf
    Local $levelstat = IniRead($path, "misc", "stat", "wis")
    If $levelstat = "dex" Then
        $levelstat = $jDex
    ElseIf $levelstat = "wis" Then
        $levelstat = $jWis
    ElseIf $levelstat = "ntl" Then
        $levelstat = $jNtl
    ElseIf $levelstat = "str" Then
        $levelstat = $jStr
    ElseIf $levelstat = "vit" Then
        $levelstat = $jVit
    ElseIf $levelstat = "all" Then
        $levelstat = $jAll
    EndIf
    Return $levelstat
EndFunc  ;==>levelstat

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
Jos

Avoiding the error is easy but what should happen when $res = 0 is something I don't know as I am not going to even try to understand this script.

Jos

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
Jos

Maybe you "friend" can help?

I cannot see how we can help without being able to test the script or knowing what it is that is going wrong.

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

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  

×