Small help
#1

I have this code which Vince made for me (thanks Vince), for selecting random gamemode and changing it, i'm getting a warning at this line:

warning 224: indeterminate array size in "sizeof" expression (symbol "")

Код:
static const FILE_NAMES[][] = {
Full code:

Код:
new randomIndex;
static gCurrentIndex = -1;
public ChangeGame(playerid)
{
static const FILE_NAMES[][] = {
  "bare",
  "barron",
  "bandito"
};

do
{
    randomIndex = random(sizeof(FILE_NAMES));
}
while(randomIndex == gCurrentIndex);
gCurrentIndex = randomIndex;

new rconCommand[16 + sizeof(FILE_NAMES[])];
format(rconCommand, sizeof(rconCommand), "changemode %s.amx", FILE_NAMES[gCurrentIndex]);
SendRconCommand(rconCommand);
return 1;
}
Thanks.
Reply


Messages In This Thread
Small help - by Face9000 - 21.09.2015, 22:19
Re: Small help - by Jefff - 21.09.2015, 22:46
Re: Small help - by Face9000 - 21.09.2015, 22:53
Re: Small help - by Jefff - 21.09.2015, 22:58
Re: Small help - by Face9000 - 21.09.2015, 23:04
Re: Small help - by Jefff - 21.09.2015, 23:05

Forum Jump:


Users browsing this thread: 2 Guest(s)