Weird Error with a little line -
Th3b3ast5 - 07.05.2013
I'm receiving errors for this little piece of coding, anybody point out what's wrong.
Код:
new string[256];
format(string, sizeof(string), "No-one");
if(strcmp(SBizzInfo[bizid][sbExtortion],string, true ) == 0 )
{
return 0;
}
for(new i = 0; i < PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new name[MAX_PLAYER_NAME];
new wstring[MAX_PLAYER_NAME];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "%s", name);
strmid(wstring, string, 0, strlen(string), 255);
if(strcmp(SBizzInfo[bizid][sbExtortion] ,wstring, true ) == 0 )
{
new value = money / 100;
value = value * 10;
GiveCash(i, value);
SBizzInfo[bizid][sbTill] -= value;
}
}
}
return 1;
}
public PreparePaintball()
{
for(new i = 0; i < PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
SendClientMessage(i, COLOR_YELLOW, "Paintball Match will start in 20 seconds.");
}
}
}
SetTimer("StartPaintball", 20000, 0);
return 1;
}
public StartPaintball()
{
PaintballRound = 1;
StartingPaintballRound = 0;
PaintballWinner = 999;
PaintballWinnerKills = 0;
for(new i = 0; i < PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
AC_ResetPlayerWeapons(i);
AC_GivePlayerWeapon(i, 29, 999);
TogglePlayerControllable(i, 1);
SendClientMessage(i, COLOR_YELLOW, "Paintball Match started, 4 minutes left.");
PlayerPlaySound(i, 1057, 0.0, 0.0, 0.0);
}
}
}
SetTimer("PaintballEnded", 240000, 0);
return 1;
}
public PaintballEnded()
{
new string[256];
new name[MAX_PLAYER_NAME];
for(new i = 0; i < PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
if(IsPlayerConnected(PaintballWinner))
{
GetPlayerName(PaintballWinner, name, sizeof(name));
format(string,sizeof(string), "** %s won the Paintball Match with %d kills **",name,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
AC_ResetPlayerWeapons(i);
PlayerPaintballing[i] = 0;
SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
}
}
}
AnnouncedPaintballRound = 0;
PaintballRound = 0;
return 1;
public DollahScoreUpdate()
{
new LevScore;
for(new i=0; i<PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
LevScore = PlayerInfo[i][pLevel];
SetPlayerScore(i, LevScore);
}
}
return 1;
}
OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
{
if (gPlayerUsingLoopingAnim[playerid] == 1) TextDrawHideForPlayer(playerid,txtAnimHelper);
ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
animation[playerid]++;
}
Errors:
(1888 ) : error 017: undefined symbol "GiveCash"
(1917) : error 017: undefined symbol "GiveCash"
(1989) : error 079: inconsistent return types (array & non-array)
(1991) : warning 225: unreachable code
(1991) : error 029: invalid expression, assumed zero
(1991) : error 004: function "DollahScoreUpdate" is not implemented
(2002) : error 079: inconsistent return types (array & non-array)
(2005) : warning 225: unreachable code
(2005) : error 017: undefined symbol "OnePlayAnim"
(2007) : error 017: undefined symbol "playerid"
(2007) : error 017: undefined symbol "playerid"
(2008 ) : error 017: undefined symbol "playerid"
Re: Weird Error with a little line -
willsuckformoney - 07.05.2013
Missing a bracket.
pawn Код:
public PaintballEnded()
{
new string[256];
new name[MAX_PLAYER_NAME];
for(new i = 0; i < PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerPaintballing[i] != 0)
{
if(IsPlayerConnected(PaintballWinner))
{
GetPlayerName(PaintballWinner, name, sizeof(name));
format(string,sizeof(string), "** %s won the Paintball Match with %d kills **",name,PaintballWinnerKills);
SendClientMessage(i, COLOR_WHITE, string);
}
AC_ResetPlayerWeapons(i);
PlayerPaintballing[i] = 0;
SetPlayerPos(i, SBizzInfo[10][sbEntranceX],SBizzInfo[10][sbEntranceY],SBizzInfo[10][sbEntranceZ]);
}
}
}
AnnouncedPaintballRound = 0;
PaintballRound = 0;
return 1;
}