heya :) I modified the original fishing.mac so it works with Brell's fishin' pole (recasts a new pole if the old one breaks)
but this is the error message I get:
Ending macro: Bad variable in /var function.
brellfishing.mac@92 (ClearStats): /varset v0 0
brellfishing.mac@11 (Main): /call ClearStats
Cleared the following: Timers Vars Arrays
The current macro has ended.
And here's the according macro:
| - Fish.mac -
|
#turbo
#event NoBait "You can't fish without fishing bait, go buy some."
#event Cast "You cast your line."
#event Skillup "You have become better at Fishing"
#chat tell
Sub Main
/cleanup
/call ClearStats <--- Line 11
/varset v99 0
|/varset t1 5m
/doevents flush
:Fish
/call CheckPole
/varset l0 $return
/doevents NoBait
/if n $l0==1 /call DoLog "Aborting: Out of poles..."
/if n $v99==1 /call DoLog "Aborting: Out of bait..."
/if n $calc($l0+$v99)>0 /call Event_Timer
/if n $calc($l0+$v99)>0 /return
/if $char(ability,fishing)>0 /if $cursor()==NULL /doability Fishing
/if $cursor()==TRUE /call KeepStats "$cursor(name)"
/if "$cursor(name)"=="Tattered Cloth Sandal" /call DestroyItem
/if "$cursor(name)"=="Rusty Dagger" /call DestroyItem
/if $cursor()==TRUE /call KeepItem
/doevents
/goto :Fish
/return
Sub CheckPole
/if "$equip(primary,name)"~~"Brell's Fishin' Pole" /return 0
/stand
/call dolog "standing up"
/delay 2s
/call dolog "standing up"
/finditem similar "Fisherman's Companion"
/delay 1 s
/click left
/delay 1 s
/click right
/delay 13s
/click left auto
/sit
/return 0
Sub KeepItem
/if "$cursor(name)"!="Fish Scales" /call DoLog "Caught $cursor(name)..."
/click left auto
/return
Sub KeepStats
/if "$p0"~~"cloth sandal" {
/varadd v0 1
} else /if "$p0"~~"rusty dagger" {
/varadd v1 1
} else /if "$p0"~~"fish scales" {
/varadd v2 1
} else /if "$p0"~~"fresh fish" {
/varadd v3 1
} else {
/varadd v4 1
}
/return
Sub DestroyItem
/call DoLog "Destroying junk..."
/click left destroy
/delay 2
/return
Sub Event_NoBait
/varset v99 1
/return
Sub Event_Cast
/varadd v5 1
/return
Sub Event_Skillup
/varadd v6 1
/return
Sub Event_Timer
/call DoLog "Run time: $calc($running/60) min - Casts: $int($v5) - Skill ups: $int($v6)"
/call DoLog "Found: $int($v0) sandals - $int($v1) daggers - $int($v2) scales - $int($v3) fresh fish - $int($v4) zone items"
/varset t$p0 $p1
/return
Sub ClearStats
/varset v0 0 <---- Line 92
/varset v1 0
/varset v2 0
/varset v3 0
/varset v4 0
/varset v5 0
/varset v6 0
/return
Sub Event_Chat
/mqlog ** $p1: '$p2'
/return
Sub DoLog
/mqlog $p0
/echo $p0
/return
----------------------------------------------
I hope you can help. I'm somewhat of a newb to this language (c++?) I'm sure the error is simple :) please help :)

