NEED HELP!
#1

Hello, i got a little problem... I will show you the errors ( im a script beginner so be nice too me, and explain easy )


Here is my edit that made it crash:

Код:
if(strcmp("/open",cmdtext,true,9) == 0)
	{
		MoveObject(AdminGate,-1362.0649414063, 937.86163330078, 1035.4147949219,2.9000);
		}
		return 1;
	}
	if(strcmp("/close",cmdtext,true,9) == 0)
  {
		MoveObject(AdminGate,-1371.8898925781, 937.91900634766, 1035.4486083984,3.0);
		}
		return 1;
}
Код:
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(67) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(67) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(67) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(485) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(547) : warning 217: loose indentation
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(549) : error 010: invalid function or declaration
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(553) : error 010: invalid function or declaration
C:\Documents and Settings\Slayer\Skrivbord\Happy RP\gamemodes\DestructionDerby.pwn(556) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

ah, you obviously forgot to place them two commands in the proper callback, where they belong in:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/open",cmdtext,true,5) == 0)
	{
		MoveObject(AdminGate,-1362.0649414063, 937.86163330078, 1035.4147949219,2.9000);
		return 1;
	}
	if(strcmp("/close",cmdtext,true,6) == 0)
	{
		MoveObject(AdminGate,-1371.8898925781, 937.91900634766, 1035.4486083984,3.0);
		return 1;
	}
	return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)