sheepiiHD / tibiaapi

tibiaapi
MIT License
1 stars 0 forks source link

Console.Say bug? #247

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It's crashing my bot
Look
    'Client & Player
    Dim player As Player
    Dim client As Client

    Private Sub uxHealer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        client = client.GetClients()(0)
        player = client.GetPlayer()
    End Sub

 Private Sub HealWithSpellHi_OnExecute() Handles HealWithSpellHi.OnExecute
        If Not client.Status = LoginStatus.LoggedIn Then Exit Sub

        If player.Health <= Convert.ToInt32(uxHealSpellHealthHi.Value) AndAlso player.Mana >= Convert.ToInt32(uxHealSpellManaHi.Value) Then
            Select Case uxHealSpellHi.SelectedItem.ToString()
                Case "exura"
                    client.Console.Say("exura")
                Case "exura gran"
                    client.Console.Say("exura gran")
                Case "exura vita"
                    client.Console.Say("exura vita")
                Case "exura ico"
                    client.Console.Say("exura ico")
                Case "exura san"
                    client.Console.Say("exura san")
                Case "exura gran san"
                    client.Console.Say("exura gran san")
            End Select
        End If
    End Sub

my code is wrong or have an error in tibiaapi?

Original issue reported on code.google.com by marcaumg...@gmail.com on 4 Dec 2012 at 2:06

GoogleCodeExporter commented 8 years ago
If you are using tibiaapi-current, make sure you have the current TibiaAPI.dll 
version in the repository. I have tested 

var client = Client.GetClients()[0];
client.Console.Say("exura...");

and that works as expected.

If you still think there is a bug, please provide a short code reproducing the 
issue. 
Avoid making it dependent on your UI or anything else that doesn't belong to 
the API, so it can be easily tested.

thank you

Original comment by geancarl...@gmail.com on 4 Dec 2012 at 4:25

GoogleCodeExporter commented 8 years ago
Yes the tibiaapi-current is on my Release folder.
in attachments is my healer class in vb.net some times it crash client

Original comment by marcaumg...@gmail.com on 4 Dec 2012 at 6:30

Attachments:

GoogleCodeExporter commented 8 years ago
Like I said, I need a succint, simple code, independent from the UI...

Original comment by geancarl...@gmail.com on 4 Dec 2012 at 6:51

GoogleCodeExporter commented 8 years ago

Original comment by geancarl...@gmail.com on 6 Dec 2012 at 10:46