#1

HI everyone! i made a filterscript with some cmds... But they give me some errors, please help me!

Код:
new opened[MAX_PLAYERS] = 0;
CMD:frontgate(playerid, params[])
{
	new pass[128];
	if(sscanf(params,"s[128]",pass)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /frontgate [password]");
	if(pass == "ddt")
	{
		if(IsPlayerInRangeOfPoint(playerid, 10.0, 305.2187500, -2462.7041000, 3.1785900));
		{
		    if(opened == 0)
		    {
				MoveObject(frontgate, 304.7954100, -2455.8132300, 8.8967000, 10.0)
				opened = 1
			}
			else
			if(opened == 1)
			{
				MoveObject(frontgate, 305.2187500, -2462.7041000, 3.1785900, 10.0)
			    opened = 0
			}
		}
	}
	return 1;
}

new airgateopened[MAX_PLAYERS] = 0;
CMD:airgate(playerid, params[])
{
	new pass[128];
	if(sscanf(params,"s[128]",pass)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /airgate [password]");
	if(pass == "ddt")
	{
		if(airgateopened == 0)
  		{
			MoveObject(airgate1, 242.5084100 ,-2455.7971200,69.7381000, 10.0)
			MoveObject(airgate2, 359.5351900, -2455.7968700,69.7381000, 10.0)
			MoveObject(airgate3, 301.2195100, -2455.7968700,110.9791000, 10.0)
			airgateopened = 1
		}
		else
		if(airgateopened == 1)
		{
  			MoveObject(airgate1, 261.5581100, -2455.7971200, 69.7381000, 10.0)
			MoveObject(airgate2, 340.9241000, -2455.7968700, 69.7381000, 10.0)
			MoveObject(airgate3, 301.2195100, -2455.7968700, 69.7381000, 10.0)
			airgateopened = 0
		}
	}
	return 1;
}

CMD:lift(playerid, params[])
{
	new pass[128], floor;
	if(sscanf(params,"s[128]u",pass)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: /lift [password] [floor]");
	if(pass == "ddt")
	{
		if(floor < 1 || floor > 3) return SendClientMessage(playerid,COLOR_WHITE,"Usage: Invalid Floor!");
		if(IsObjectMoving(lift)) return SendClientMessage(playerid,COLOR_WHITE,"Usage: The lift is already moving!");
		if(floor = 1)
  		{
   			MoveObject(lift, 403.5086100, -2457.8747600, 1.9879000, 10.0)
		}
		else
		if(floor = 2)
  		{
   			MoveObject(lift, 403.5086100, -2457.8747600, 25.9258000, 10.0)
		}
		else
		if(floor = 3)
  		{
   			MoveObject(lift, 403.5086100, -2457.8747600, 50.4822000, 10.0)
		}
		else
	}
	return 1;
}
errors:
Код:
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1471) : warning 204: symbol is assigned a value that is never used: "lift"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1470) : warning 204: symbol is assigned a value that is never used: "airgate3"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1469) : warning 204: symbol is assigned a value that is never used: "airgate2"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1468) : warning 204: symbol is assigned a value that is never used: "airgate1"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1467) : warning 204: symbol is assigned a value that is never used: "frontgate"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1697) : error 033: array must be indexed (variable "pass")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1699) : error 036: empty statement
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1701) : error 033: array must be indexed (variable "opened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1703) : error 017: undefined symbol "frontgate"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1704 -- 1705) : error 033: array must be indexed (variable "opened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1707) : error 033: array must be indexed (variable "opened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1709) : error 017: undefined symbol "frontgate"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1710 -- 1711) : error 033: array must be indexed (variable "opened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1722) : error 033: array must be indexed (variable "pass")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1724) : error 033: array must be indexed (variable "airgateopened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1726) : error 017: undefined symbol "airgate1"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1727) : error 017: undefined symbol "airgate2"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1728) : error 017: undefined symbol "airgate3"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1729 -- 1730) : error 033: array must be indexed (variable "airgateopened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1732) : error 033: array must be indexed (variable "airgateopened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1734) : error 017: undefined symbol "airgate1"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1735) : error 017: undefined symbol "airgate2"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1736) : error 017: undefined symbol "airgate3"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1737 -- 1738) : error 033: array must be indexed (variable "airgateopened")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1747) : error 033: array must be indexed (variable "pass")
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1750) : error 017: undefined symbol "lift"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1751) : warning 211: possibly unintended assignment
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1753) : error 017: undefined symbol "lift"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1756) : warning 211: possibly unintended assignment
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1758) : error 017: undefined symbol "lift"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1761) : warning 211: possibly unintended assignment
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1763) : error 017: undefined symbol "lift"
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1766) : error 029: invalid expression, assumed zero
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1766 -- 1767) : warning 215: expression has no effect
C:\Users\ema\Desktop\Samp Server\filterscripts\ddt_base.pwn(1767) : error 001: expected token: ";", but found "return"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

no one?! ;(
Reply
#3

Use strcmp to compare strings!


>>
PHP код:
if(pass == "ddt"
Reply
#4

i dont think that's the probem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)