16.02.2014, 19:52
Cуdigo do Random
Erro:
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(16) : error 010: invalid function or declaration
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 017: undefined symbol "random"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 001: expected token: ";", but found "sizeof"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : warning 215: expression has no effect
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 001: expected token: ";", but found ")"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
PHP код:
new RandomServerName[4][] = // Nomes Server Random
{
"Nome do server 1",
"Nome do server 2",
"Nome do server 3",
"Nome do server 4"
};
SetTimer("SendMSG", 1000, true);//OnGameModeInit
forward SendMSG();
public SendMSG()
{
new string[256];
new randMSG = random(sizeof(RandomServerName));
format(string,sizeof(string),"hostname %s",RandomServerName[randMSG]);
SendRconCommand(string);
}
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(16) : error 010: invalid function or declaration
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 017: undefined symbol "random"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 001: expected token: ";", but found "sizeof"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : warning 215: expression has no effect
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : error 001: expected token: ";", but found ")"
C:\Users\Caio\Desktop\[GM]Brasil Trucker's Fire\BTF 2.0\gamemodes\BTF.pwn(22) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.