Hello everyone! I'm a scripting beginner and have a small problem. I tried to make a race by following a tutorial,but here's what I get every time I try to compile my script:
Код:
C:\Documents and Settings\xxx\Desktop\xxx\gamemodes\AE.pwn(128) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xxx\Desktop\xxx\gamemodes\AE.pwn(128) : error 029: invalid expression, assumed zero
C:\Documents and Settings\xxx\Desktop\xxx\gamemodes\AE.pwn(128) : warning 215: expression has no effect
C:\Documents and Settings\xxx\Desktop\xxx\gamemodes\AE.pwn(128) : error 001: expected token: ";", but found "if"
C:\Documents and Settings\xxx\Desktop\xxx\gamemodes\AE.pwn(128) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Код:
if(PlayerToPoint(radius, playerid, 2033.0308,-2493.8889,13.2681))//Kada stigne na CheckPoint 1
Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(GetPVarInt(playerid,"Trka") >= 2)
{
if(PlayerToPoint(radius, playerid, 2033.0308,-2493.8889,13.2681))//Kada stigne na CheckPoint 1
{
if(GetPVarInt(playerid,"Trka") == 2)
{
SetPVarInt(playerid, "Trka", 3);
SetPlayerRaceCheckpoint(playerid, tip, 1852.0031,-2494.5098,13.2817,90.1373,116,1, radius2); // Postavlja CheckPoint 2
}
}
if(PlayerToPoint(radius2, playerid, 1852.0031,-2494.5098,13.2817))//Kada stigne na CheckPoint 2
{
if(GetPVarInt(playerid,"Trka") == 2)
{
SetPVarInt(playerid, "Trka", 4);
SetPlayerRaceCheckpoint(playerid, tip, 1536.7753,-2493.3391,13.2818,93.2181,116,1, radius3);
}
}
if(PlayerToPoint(radius3, playerid, 1536.7753,-2493.3391,13.2818))//Kada stigne na poslednji CheckPoint
{
if(GetPVarInt(playerid,"Trka") == 3)
{
DisablePlayerRaceCheckpoint(playerid);
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(playerid,"Trka") > 0)
{
format(string, sizeof(string), "*Aero LS 402 Race | Cilj: %s",sendername);
SendClientMessage(i,0x9ACD32AA, string);
}
}
}
}
}
}
return 1;
}
I hope that someone will have an idea how to solve my problem.