You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oh, this is an interesting problem. Thanks for bringing it to my attention! It seems there was an oversight on the flow of starting the server. For now, you could make a method UpdateSettings(s *ServerSettings) in server.go that replaces the // Set server settings potion of the Start() function (just cut-paste into the new function). Then you can update the settings before calling SetLogoutCallback() or anything else that needs it before starting. I just don't have the time to get around to this for a day or so.
Another problem is golang cant include pullrequests from github modules.
I have modified the server.go, but i cant get it loaded in my project as its not a "master" oder "stable" version.
This project hasn't been set up with go modules. At least not yet. I've been able to use GGS along with other Go APIs without modules. Are you sure your project is in the right gopath to prevent it from using modules?
Because if i import your GGS github.com/hewiefreeman/GopherGameServer/
my pullrequest wasnt imported , so the func "gopher.UpdateServerSettings(&settings) " didnt exist.
Its a big hassle to import "github libs" that change. you have to use terminal commands to reset caches
go mod -clean
go mod tidy
go get github.com/perling1/GopherGameServer@master
Thats an annoying act while using "go and mod". Its not due to your project.
Activity
perling1 commentedon Feb 13, 2022
To give more insight, the callback onlogout works as described. It doesnt throw a nil pointer panic.
The nil pointer comes from line125 in callbacks.go
its the only line of code that tries to access the setting by *
if (*settings).EnableSqlFeatures {hewiefreeman commentedon Feb 14, 2022
Oh, this is an interesting problem. Thanks for bringing it to my attention! It seems there was an oversight on the flow of starting the server. For now, you could make a method
UpdateSettings(s *ServerSettings)inserver.gothat replaces the// Set server settingspotion of theStart()function (just cut-paste into the new function). Then you can update the settings before callingSetLogoutCallback()or anything else that needs it before starting. I just don't have the time to get around to this for a day or so.perling1 commentedon Feb 14, 2022
Another problem is golang cant include pullrequests from github modules.
I have modified the server.go, but i cant get it loaded in my project as its not a "master" oder "stable" version.
hewiefreeman commentedon Feb 15, 2022
This project hasn't been set up with go modules. At least not yet. I've been able to use GGS along with other Go APIs without modules. Are you sure your project is in the right gopath to prevent it from using modules?
perling1 commentedon Feb 15, 2022
I was maybe to unspecific. I use a go.mod file with my own fork
In the main testserver.go file:
Because if i import your GGS github.com/hewiefreeman/GopherGameServer/
my pullrequest wasnt imported , so the func "gopher.UpdateServerSettings(&settings) " didnt exist.
Its a big hassle to import "github libs" that change. you have to use terminal commands to reset caches
go mod -clean
go mod tidy
go get github.com/perling1/GopherGameServer@master
Thats an annoying act while using "go and mod". Its not due to your project.