Hmm, still getting another error, here's the code, output from mud, trigger, and error:
Quote:Sub Auto_sip (a,b,wildcard)
Dim health, mana
health = CInt(Wildcard(1)) 'Line 277
mana = CInt(Wildcard(2))
World.ColourNote "black", "white", health & " " & mana
If health < 2800 then
If drink = 1 then
World.Send "drink health"
drink = 0
End If
End If
End Sub
<triggers>
<trigger
enabled="y"
group="autobashing"
keep_evaluating="y"
match="^(.*?)h\, (.*?)m *"
regexp="y"
script="auto_sip"
sequence="100"
other_text_colour="black"
other_back_colour="black"
>
</trigger>
</triggers>
Error number: -2146828275
Event: Execution of line 277 column 3
Description: Type mismatch: 'CInt'
Called by: Function/Sub: auto_sip called by trigger
Reason: processing trigger ""
3387h, 1746m exk-River long dead.
You see exits leading southeast and southwest.
3387h, 1746m exk-
I don't echo commands, so my prompt won't have anything after it, -until- I send something through.
Any ideas on this one? I don't understand why it's telling me type mismatch. Earlier today I looked up a vbscript reference site, and it had an example of code that was:
CInt(String -variablenamehere-)
But that didn't work either, thanks for your help again, Nick |