Closed tangbo1430 closed 2 years ago
func main() { myLoginInfo := new(steam.LogOnDetails) myLoginInfo.Username = "Your username" myLoginInfo.Password = "Your password"
client := steam.NewClient() client.Connect() for event := range client.Events() { switch e := event.(type) { case *steam.ConnectedEvent: client.Auth.LogOn(myLoginInfo) case *steam.MachineAuthUpdateEvent: ioutil.WriteFile("sentry", e.Hash, 0666) case *steam.LoggedOnEvent: client.Social.SetPersonaState(steamlang.EPersonaState_Online) case steam.FatalErrorEvent: log.Print(e) case error: log.Print(e) } }
}
@tangbo1430 How did u fix it? Thanks
@tangbo1430 How did u fix it? Thanks
client := steam.NewClient()
steam.InitializeSteamDirectory() //<----- add this
client.Connect()
@tangbo1430 How did u fix it? Thanks
client := steam.NewClient() steam.InitializeSteamDirectory() //<----- add this client.Connect()
Yep, thanks, i have already found it :)
func main() { myLoginInfo := new(steam.LogOnDetails) myLoginInfo.Username = "Your username" myLoginInfo.Password = "Your password"
}