29.06.2009, 10:32
I wrote this on my script:
OnGameModeInIt:
On top:
On other scripts:
GAME_NAME = "name".
i dont have any errors or warnings, but when i starting my server i have "crash report" and my server got closed.
if im writing in OnGameModeInIt like this:
without [Game] in GameNames, its works, but all my items in my menu called "d", and not the game name.
my english is not so good, as u see :S
if u got the point, pls help.
*i have two scripts named "0", and "1".
OnGameModeInIt:
Код:
for(new Game = 0; Game < MAX_GAMES_LOOP; Game++) { format(string, 100, "loadfs %d", Game), SendRconCommand(string); CallRemoteFunction("GetGameName","sd",GameNames[Game], 24); format(string, 100, "unloadfs %d", Game), SendRconCommand(string); format(string, 100, "%s", GameNames[Game]), AddMenuItem(GameVote,0,string); }
Код:
#define MAX_GAMES 1 #define MAX_GAMES_LOOP MAX_GAMES+1 new GameNames[MAX_GAMES_LOOP][24];
Код:
public GetGameName(name[], len) return format(name, len, "%s", GAME_NAME);
i dont have any errors or warnings, but when i starting my server i have "crash report" and my server got closed.
if im writing in OnGameModeInIt like this:
Код:
for(new Game = 0; Game < MAX_GAMES_LOOP; Game++) { format(string, 100, "loadfs %d", Game), SendRconCommand(string); CallRemoteFunction("GetGameName","sd",GameNames 24); format(string, 100, "unloadfs %d", Game), SendRconCommand(string); format(string, 100, "%s", GameNames), AddMenuItem(GameVote,0,string); }
my english is not so good, as u see :S
if u got the point, pls help.
*i have two scripts named "0", and "1".