19.06.2016, 08:21
Error
Script
PHP код:
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(322) : warning 202: number of arguments does not match definition
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(325) : warning 217: loose indentation
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(364) : error 052: multi-dimensional arrays must be fully initialized
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(370) : error 052: multi-dimensional arrays must be fully initialized
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 029: invalid expression, assumed zero
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 029: invalid expression, assumed zero
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : warning 215: expression has no effect
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : error 001: expected token: ";", but found "]"
C:\Users\Kevin11\Desktop\Freeroam da 0\gamemodes\Freeroam.pwn(375) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
6 Errors.
PHP код:
public OnPlayerRequestClass(playerid, classid)
{
switch(classid) //Cambia gli id delle classi
{
case 0/* Classe id dei Bloods.*/:
{
SetPlayerTeam(playerid, Bloods); //Ti setta nei Bloods
GameTextForPlayer(playerid, "~r~Bloods", 1000, 3); //Scritta Bloods
}
case 1/* Classe id dei Crips.*/:
{
SetPlayerTeam(playerid, Crips); //Ti setta nei Crips
GameTextForPlayer(playerid, "~b~Crips, 1000", 3); //Scritta Crips
}
}
return 1;
}
public OnPlayerText(playerid,text[])
{
if(text[0] == '!')
{
new string[128]; GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[Radio] %s: %s", string, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}
return 1;
}
public OnPlayerSpawn(playerid)
{
if(GetPlayerTeam(playerid) == Bloods)
{
SetPlayerColor(playerid, BloodsColore); //Colore team
SetPlayerRandomBloodsSpawn(playerid); /// Nuova linea, spawn random nei bloods
}
else if(GetPlayerTeam(playerid) == Crips)
{
SetPlayerColor(playerid, CripsColore);
SetPlayerRandomCripsSpawn(playerid);///// Nuova linea
}
}
new Float:BloodsRandomSpawns[4][3] = {
{1881.4601,-2030.7333,13.3906},
{1901.9595,-2058.3523,13.5469},
{1353.1327,380.8547,19.4063}
};
new Float:CripsRandomSpawns[4][3] = {
{1881.4601,-2030.7333,13.3906},
{1901.9595,-2058.3523,13.5469},
{1353.1327,380.8547,19.4063}
};
forward SetPlayerRandomBloodsSpawn(playerid);
public SetPlayerRandomBloodsSpawn(playerid)
{
new rand = random(sizeof(BloodsRandomSpawns));
SetPlayerPos(playerid, BloodsRandomSpawns[rand][0], BloodsRandomSpawn[rand][1], BloodsRandomSpawns[rand][2]); // [rand] means random, [0] = X, [1] = Y, [2] = Z
return 1;
}