Telecmd
#1

Compile text:
C:\Documents and Settings\Administrator\Bureaublad\Warserver\filter scripts\cmds.pwn(20) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Script:
Код:
//-------------------------------------------------
  public OnPlayerCommandText(playerid, cmdtext[])
  
	if(strcmp("/help", cmdtext, true) == 0)
	{
		SendClientMessage(playerid,0xAFAFAFAA,"Available Commands:");
		SendClientMessage(playerid,0xAFAFAFAA,"/controltower - ");
		}
	if(strcmp("/controltower", cmdtext, true) == 2)
	{
  SetPlayerPos(playerid, 1767.6691, -2431.9624, 13.5547);
	}
//-------------------------------------------------
How i fix this? Im a beginner in teleports ;d
Reply
#2

where is the line of error ??
Reply
#3

if(strcmp("/controltower", cmdtext, true) == 2)
Reply
#4

if(strcmp(cmdtext, "/controltower", true) == 0)
Reply
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/help", cmdtext, true) == 0)
	{
		SendClientMessage(playerid,0xAFAFAFAA,"Available Commands:");
		SendClientMessage(playerid,0xAFAFAFAA,"/controltower - ");
		return 1;
	}
	if(strcmp("/controltower", cmdtext, true) == 0)
	{
		SetPlayerPos(playerid, 1767.6691, -2431.9624, 13.5547);
		return 1;
	}
	return 0;
}
Reply
#6

That error is not away.
New Script:
Код:
//-------------------------------------------------
  public OnPlayerCommandText(playerid, cmdtext[])
  
	if(strcmp("/help", cmdtext, true) == 0)
	{
		SendClientMessage(playerid,0xAFAFAFAA,"Available Commands:");
		SendClientMessage(playerid,0xAFAFAFAA,"/controltower - ");
		}
  if(strcmp("/controltower", cmdtext, true) == 0)
	{
  SetPlayerPos(playerid, 1767.6691, -2431.9624, 13.5547);
	}
//-------------------------------------------------
Error not changed.
Fixed! ;d
Reply
#7

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{

	if(strcmp("/help", cmdtext, true) == 0)
	{
		SendClientMessage(playerid,0xAFAFAFAA,"Available Commands:");
		SendClientMessage(playerid,0xAFAFAFAA,"/controltower - ");
		return 1;
	}
  if(strcmp("/controltower", cmdtext, true) == 0)
	{
	  SetPlayerPos(playerid, 1767.6691, -2431.9624, 13.5547);
	  return 1;
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)