Set hostname to something defined
#1

I did

#define ServerName "poop"

And then I did

SendRconCommand("hostname " + ServerName);

But that gives me this error

C:\Users\x3990.003\Desktop\Rp Server\gamemodes\rp.pwn(177) : error 001: expected token: "-string end-", but found "-identifier-"
Reply
#2

I'm guessing you wrongly formatted it, try the following:
pawn Код:
new string[256];
format(string,sizeof(string), "hostname %s", ServerName);
SendRconCommand(string);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)