21.01.2015, 11:00
Hello, I got error when I was creating my GM but I do not know how to fix
Errors:
Code:
I hope that anyone help me.
Regards,
ShadyX
Errors:
pawn Код:
D:\BF4S\gamemodes\bf4s.pwn(14) : error 018: initialization data exceeds declared size
D:\BF4S\gamemodes\bf4s.pwn(22) : error 018: initialization data exceeds declared size
D:\BF4S\gamemodes\bf4s.pwn(83) : warning 202: number of arguments does not match definition
D:\BF4S\gamemodes\bf4s.pwn(86) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
pawn Код:
//Line 14 and 22
new Float:USARandomSpawns[4][3] = {
{207.0986,1929.8029,23.2422,180.4532},
{213.5416,1858.0024,20.6406,3.1282},
{141.1846,1875.6771,17.8434,268.0424},
{207.0986,1929.8029,23.2422,180.4532}
};
new Float:RussiaRandomSpawns[4][3] = {
{-242.9845,2711.9512,62.6875,177.2704},
{-183.1272,2748.0396,62.6875,120.5566},
{-255.1463,2603.4963,62.8582,272.5013},
{-242.9845,2711.9512,62.6875,177.2704}
};
//Line 83 and 86
public OnPlayerRequestClass(playerid, classid)
{
// So, we're gonna simply use a switch instead of if-else if structure
switch(classid) // Switching between the classids
{
case 0/* The first classid is of the USA*/:
{
SetPlayerTeam(playerid, USA); // Setting players team
GameTextForPlayer(playerid, "~b~United States (U.S.A)", 1000, 3); // Screen msg for player to show what team
}
case 1/* The second classid is of the Russia*/:
{
SetPlayerTeam(playerid, Russia); // Same as above
GameTextForPlayer(playerid, "~g~Russian Federation, 1000", 3); // Same as above
}
}
return 1;
}
Regards,
ShadyX