04.04.2013, 13:59
I was trying to merge RydeR's reaction test with my gamemode, so here's the code.
Errors:
pawn Код:
public OnPlayerText(playerid, text[])
{
new name[MAX_PLAYER_NAME], msg[128];
GetPlayerName(playerid, name, sizeof(name));
format(msg, sizeof(msg), "{00FFFF}(%d) {ffffff}%s", playerid, text);
SendPlayerMessageToAll(playerid, msg);
return 0;
{
switch(xTestBusy)
{
case true:
{
if(!strcmp(xChars, text, false))
{
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "« %s has won the reaction test. »", pName);
SendClientMessageToAll(GREEN, string);
format(string, sizeof(string), "« You have earned $%d + %d score points. »", xCash, xScore);
SendClientMessage(playerid, GREEN, string);
GivePlayerMoney(playerid, xCash);
SetPlayerScore(playerid, GetPlayerScore(playerid) + xScore);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
xTestBusy = false;
}
}
}
}
return 1;
}
}
Код:
C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(6359) : warning 225: unreachable code C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(6359) : warning 217: loose indentation C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(6380) : warning 217: loose indentation C:\Users\Kelvin\Desktop\Scripting\gamemodes\racerevolution.pwn(6382) : error 054: unmatched closing brace ("}") Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.