[HELP] Using SendRconCommand -
Tenshi - 17.01.2011
Ok i'm having tricky issues with this.
I thought i could do this;
SendRconCommand("mapname %s", mapname );
(mapname is already defined)
but i'm doing this wrong aren't i?
is there another way of doing this with SendRconCommand(s) ?
Код:
warning 202: number of arguments does not match definition
and
then i added new mapname[50]; and;
Код:
warning 219: local variable "mapname" shadows a variable at a preceding level
... ?
?
Re: [HELP] Using SendRconCommand -
Toreno - 17.01.2011
pawn Код:
new string[32];
format(string, sizeof(string), "mapname %s",mapname);
SendRconCommand(string);
Re: [HELP] Using SendRconCommand -
blackwave - 17.01.2011
pawn Код:
new cmd[128],idx,tmp[100];
cmd = strtok(cmdtext,idx);
if(!strcmp(cmd, "/map", true))
{
new map;
tmp = strtok(cmdtext,idx);
map = strval(tmp);
if(!strlen(tmp)) return 0;
else SendRconCommand(mapname tmp);
return 1;
}
Re: [HELP] Using SendRconCommand -
hanzen - 17.01.2011
Quote:
Originally Posted by EliranPesahov
pawn Код:
new string[128]; format(string, sizeof(string), "%s",mapname); SendRconCommand(string);
|
Jeeeeez.
pawn Код:
new
m_Name[32]
;
format(m_Name, sizeof(m_Name), "mapname %s", mapname);
SendRconCommand(m_Name);
Re: [HELP] Using SendRconCommand -
Toreno - 17.01.2011
Quote:
Originally Posted by hanzen
Jeeeeez.
pawn Код:
new m_Name[32] ; format(m_Name, sizeof(m_Name), "mapname %s", mapname); SendRconCommand(m_Name);
|
Tsss... moron.
Re: [HELP] Using SendRconCommand -
hanzen - 17.01.2011
Quote:
Originally Posted by EliranPesahov
Tsss... moron.
|
Why? Your code won't work.
Re: [HELP] Using SendRconCommand -
Toreno - 17.01.2011
Quote:
Originally Posted by hanzen
Why? Your code won't work.
|
I know, I forgot... mapname.
And I don't really know what's the limit of MAPNAME.
People can do a mistake, you know.
Re: [HELP] Using SendRconCommand -
Toreno - 17.01.2011
You didn't correct me, you were "Jeeezing" me.
Re: [HELP] Using SendRconCommand -
hanzen - 17.01.2011
Quote:
Originally Posted by EliranPesahov
You didn't correct me, you were "Jeeezing" me.
|
Calm down, it was a big jeez.
Re: [HELP] Using SendRconCommand -
Tenshi - 17.01.2011
wow, dont fight LOL
and
Код:
new m_string[30];
format(m_string, sizeof(m_string), "mapname %s",mapname);
SendRconCommand(m_string);
and wow i'm an idiot... ^
Works +1 - thanks guys ....
You both helped lol
1: for code and 2nd for giving me an idea to change string name, since it has already but isn't giving me a error or warning about it- thanks.