Need help pawn -
DeagleJJ - 01.03.2016
I have problem with scripting
Код:
C:\Users\Korisnik\Desktop\DeathMatch\gamemodes\DeathMatch.pwn(1786) : error 036: empty statement
C:\Users\Korisnik\Desktop\DeathMatch\gamemodes\DeathMatch.pwn(1790) : error 036: empty statement
C:\Users\Korisnik\Desktop\DeathMatch\gamemodes\DeathMatch.pwn(1802) : error 036: empty statement
C:\Users\Korisnik\Desktop\DeathMatch\gamemodes\DeathMatch.pwn(1806) : error 036: empty statement
Код:
// /enter /exit commands
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1465.3230,-1010.9038,26.8438))
{
SetPlayerPos(playerid,2305.2227,-16.1804,26.7422);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 2421.6328,-1220.3962,25.4868));
{
SetPlayerPos(playerid,1204.8491,-13.1725,1000.9219);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 2104.4556,-1806.4227,13.5547));
{
SetPlayerPos(playerid,372.4194,-133.1292,1001.4922);
}
return 1;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2305.2227,-16.1804,26.7422))
{
SetPlayerPos(playerid,1465.3230,-1010.9038,26.8438);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 1204.8491,-13.1725,1000.9219));
{
SetPlayerPos(playerid,2421.6328,-1220.3962,25.4868);
}
if(IsPlayerInRangeOfPoint(playerid, 5, 372.4194,-133.1292,1001.4922));
{
SetPlayerPos(playerid,2104.4556,-1806.4227,13.5547);
}
}
PROBLEM solved. Delete Post
Re: Need help pawn -
BiosMarcel - 01.03.2016
you should format your code, just by looking this i want to vomit
Re: Need help pawn -
AmigaBlizzard - 01.03.2016
PHP код:
if(IsPlayerInRangeOfPoint(playerid, 5, 2421.6328,-1220.3962,25.4868));
Remove the ; after each if-statement.
TIP: if an if-statement is followed by only one line of code, you don't need the {}, it makes more readable code:
PHP код:
if (strcmp("/enter", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 1465.3230,-1010.9038,26.8438))
SetPlayerPos(playerid,2305.2227,-16.1804,26.7422);
if(IsPlayerInRangeOfPoint(playerid, 5, 2421.6328,-1220.3962,25.4868))
SetPlayerPos(playerid,1204.8491,-13.1725,1000.9219);
if(IsPlayerInRangeOfPoint(playerid, 5, 2104.4556,-1806.4227,13.5547))
SetPlayerPos(playerid,372.4194,-133.1292,1001.4922);
return 1;
}
if (strcmp("/exit", cmdtext, true, 10) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 5, 2305.2227,-16.1804,26.7422))
SetPlayerPos(playerid,1465.3230,-1010.9038,26.8438);
if(IsPlayerInRangeOfPoint(playerid, 5, 1204.8491,-13.1725,1000.9219))
SetPlayerPos(playerid,2421.6328,-1220.3962,25.4868);
if(IsPlayerInRangeOfPoint(playerid, 5, 372.4194,-133.1292,1001.4922))
SetPlayerPos(playerid,2104.4556,-1806.4227,13.5547);
}
Re: Need help pawn -
CalvinC - 01.03.2016
Remove the ";" semicolons after your if-statements.
They should only be used on functions, in this case SetPlayerPos.