20.10.2012, 14:58
I tried make racescript from tutorial... i need help with this. I dont know i am really so stuck with this...
i dont know is this code fully wrong but... help me some way.
i dont know is this code fully wrong but... help me some way.
pawn Код:
//race money//
#define winner_money 10000
//race//
new Player_CheckPoint[MAX_PLAYERS];
new bool:IsRaceRunning = false;
new WinnerName[MAX_PLAYER_NAME];
new stringwin[64];
// /stadium //
new CheckPoints[6][3] =
{
{-1387.9617,-150.3628,1051.1130},
{-1266.0642,-191.8460,1050.6694},
{-1362.2384,-282.4844,1045.5226},
{-1407.9147,-149.4444,1044.0071},
{-1530.5360,-195.5463,1050.7349},
{-1459.8761,-281.2035,1050.6205},
{-1387.9617,-150.3628,1051.1130}
}; <--- (44) : error 052: multi-dimensional arrays must be fully initialized(((((((((ERROR HERE)))))))))
public OnPlayerEnterCheckpoint(playerid)
{
if(IsRaceRunning == true) { Player_CheckPoint[playerid]++; }
if(Player_CheckPoint[playerid] == 10 && IsRaceRunning == true)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
DisablePlayerRaceCheckpoint(i);
}
GetPlayerName(playerid,WinnerName,sizeof(WinnerName));
format(stringwin,sizeof(stringwin),"[RACE] The race is over, %s has won and achieved $%d!",WinnerName,winner_money);
SendClientMessageToAll(0xFF0000FF,stringwin);
GivePlayerMoney(playerid,winner_money);
IsRaceRunning = false;
}
return 1;
}
CMD:race(playerid, params[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerPos(playerid, -1395.958,-208.197,1051.170);
SetPlayerInterior(playerid, 7);
Player_CheckPoint[i] = 0;
SetPlayerRaceCheckpoint(i,0,CheckPoints[0][0],CheckPoints[0][1],CheckPoints[0][2],CheckPoints[1][0],CheckPoints[1][1],CheckPoints[1][2],9.7);
IsRaceRunning = true;
}
}
return 1;
}
CMD:leaverace(playerid, params[])
{
SetPlayerPos(playerid, 2103.4600,-1806.5900,13.5547);
SetPlayerInterior(playerid, 0);
return 1;
}
pawn Код:
C:\Users\asd\Desktop\samp03e_svr_R2_win32\pawno\test.pwn(42) : error 018: initialization data exceeds declared size
C:\Users\asd\Desktop\samp03e_svr_R2_win32\pawno\test.pwn(44) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.