Code Monkey home page Code Monkey logo

Comments (5)

rakijah avatar rakijah commented on May 30, 2024

Hello,
can you try removing the line that gives you an error and then changing the line
Private Sub OnNewGameState(gs As GameState)
to
Private Sub OnNewGameState(gs As GameState) Handles gsl.OnNewGameState
I personally haven't used VB in a long time so I'm afraid I can't help you any further than this...

from csgsi.

n1lsik avatar n1lsik commented on May 30, 2024

Thanks for the answer!
Unfortunately, this does not solve the problem. Now an error indicating "gsl"
Private Sub OnNewGameState(gs As GameState) Handles gsl.OnNewGameState
Error code BC30506
My new code:

Imports CSGSI
Imports CSGSI.Nodes

Module Module1

    Public gsl As GameStateListener

    Sub Main()
        gsl = New GameStateListener(3000)
        If Not gsl.Start() Then
            Environment.[Exit](0)
        End If
        Console.WriteLine("Listening...")
    End Sub

    Dim IsPlanted As Boolean = False

    Private Sub OnNewGameState(gs As GameState) Handles gsl.OnNewGameState

        If Not IsPlanted AndAlso gs.Round.Phase = RoundPhase.Live AndAlso gs.Round.Bomb = BombState.Planted AndAlso gs.Previously.Round.Bomb = BombState.Undefined Then
            Console.WriteLine("Bomb has been planted.")
            IsPlanted = True
        ElseIf IsPlanted AndAlso gs.Round.Phase = RoundPhase.FreezeTime Then
            IsPlanted = False
        End If
    End Sub
End Module


from csgsi.

rakijah avatar rakijah commented on May 30, 2024

Revert the change and try replacing the line
gsl.NewGameState += New NewGameStateHandler(AddressOf OnNewGameState)
with
AddHandler gsl.NewGameState, AdressOf OnNewGameState

from csgsi.

n1lsik avatar n1lsik commented on May 30, 2024

You will not believe), but I found the same solution, and it works! Thank you so much!
P.S
I did not understand a bit of what is needed gamestate_integration_test.cfg. I'm working on testing and it seems that without it, nothing works( if possible do without him or work with this easy? (Without the addition of this file in the configs)

from csgsi.

rakijah avatar rakijah commented on May 30, 2024

The .cfg tells CSGO what data to send and where to send it. For example, if you have an application that only needs map information, you can leave out all the other data (player info etc.) and save bandwidth.
It is required to make any game state integration related application to work, sadly.

from csgsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.