SA-MP Forums Archive
Starting SAMP Server. GoLang. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Starting SAMP Server. GoLang. (/showthread.php?tid=609763)



- kaZax - 16.06.2016

I'm starting samp-server.exe but taking error:

On server.cfg all ok!

go code:
PHP код:
func startServer() {
    
cmd := exec.Command("E:/Soft/SampServer/samp-server.exe")
    var 
out bytes.Buffer
    cmd
.Stdout = &out
    err 
:= cmd.Run()
    if 
err != nil {
        
log.Fatal(err)
    }
    
fmt.Println(out.String())

Without go server started. But with go i take this error.


Re: Starting SAMP Server. GoLang. - ev0lution - 16.06.2016

Your working directory needs to be set to the root of the sa-mp server, otherwise it tries to read server.cfg from wherever it's being run (which probably doesn't exist, producing that rcon password error).


Re: Starting SAMP Server. GoLang. - kaZax - 16.06.2016

Quote:
Originally Posted by ev0lution
Посмотреть сообщение
Your working directory needs to be set to the root of the sa-mp server, otherwise it tries to read server.cfg from wherever it's being run (which probably doesn't exist, producing that rcon password error).
thank you