public OnPlayerCommandText(playerid, cmdtext[])
if(strcmp(cmdtext, "/enter", true) == 0) // BANK
{
if(PlayerToPoint(6.0, playerid, 1462.3953,-1011.4509,26.8438)); // <-- Line 75
}
{
SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509);
}
}
test.pwn(75) : error 036: empty statement
Originally Posted by [GTA
Deadly_Evil ]
You forget to add return 1; } |
public OnPlayerCommandText(playerid, cmdtext[]) if(strcmp(cmdtext, "/enter", true) == 0) // BANK { if(PlayerToPoint(6.0, playerid, 1462.3953,-1011.4509,26.8438)); // <-- Line 75 // } { SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509); } return 1; }
public OnPlayerCommandText(playerid, cmdtext[]) // <-- Line 70
if(strcmp(cmdtext, "/enter", true) == 0) // BANK <-- Line 71
{
if(PlayerToPoint(6.0, playerid, 1462.3953,-1011.4509,26.8438)); // <-- Line 73
}
{
SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509); // <-- Line 76
}
return 1; // <-- Line 78
}
C:\Documents and Settings\¤¤¤¤¤¤¤\Desktop\test.pwn(73) : error 036: empty statement
C:\Documents and Settings\¤¤¤¤¤¤¤\Desktop\test.pwn(78) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/enter", true) == 0) // BANK { if(PlayerToPoint(6.0, playerid, 1462.3953,-1011.4509,26.8438)); // <-- Line 75 { SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509); } return 1; } return 0; // does not take part in the command, just at the call back } // same as above
Originally Posted by VonLeeuwen
As I said before, try this:
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if(strcmp(cmdtext, "/enter", true) == 0) // BANK { if(PlayerToPoint(6.0, playerid, 1462.3953,-1011.4509,26.8438)); // <-- Line 75 { SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509); } return 1; } return 0; // does not take part in the command, just at the call back } // same as above |
Originally Posted by Torran
What is it, Why does everyone use IsPlayerToPoint, Use:
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint Its way way better, I dont know why people still use IsPlayerToPoint |
Originally Posted by Torran
Quote:
Quote:
|
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/enter", true) == 0) // BANK
{
if(IsPlayerInRangeOfPoint(playerid, 6.0, 1462.3953,-1011.4509,26.8438))
{
SetPlayerPos(playerid, 2305.1880,-16.1371,26.7422,278.6509);
}
return 1;
}
return 0;
}