02.02.2015, 19:28
Hello.
I cannot find what's wrong in this command, Here is the compiler, And down the command + new passwordET;
I cannot find what's wrong in this command, Here is the compiler, And down the command + new passwordET;
HTML Code:
C:\Program Files\lvcnrr\gamemodes\SFCNR1.pwn(1523) : error 006: must be assigned to an array C:\Program Files\lvcnrr\gamemodes\SFCNR1.pwn(6527) : error 033: array must be indexed (variable "password") C:\Program Files\lvcnrr\gamemodes\SFCNR1.pwn(6548) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
PHP Code:
-- In the top of the script..
new passwordET = "playboy123";
PHP Code:
CMD:open(playerid,params[])
{
new password[50];
if(sscanf(params, "s[128]", password)) return SendClientMessage(playerid,COLOR_WHITE, ""COL_USAGE"[SYNTAX] {FFFFFF}/open [PASSWORD]");
if(passwordET == password)
{
new Float:x, Float:y, Float:z;
GetObjectPos(cKGate, x, y, z);
if(x == -2079.33032 && y == 1564.73865 && z == 19.41173)
{
if(IsPlayerInRangeOfPoint(playerid, 30, -2079.33032, 1564.73865, 19.41173))
{
MoveObject(cKGate, -2079.33032, 1564.73865, 13.82182, ETSpeed, 0.00000, 0.00000, 0.00000);
SendClientMessage(playerid, COLOR_WHITE, "{AFAFAF}[SERVER]{FFFFFF} You have opened [ET] gate.");
SetTimer("ckhq",3000,0);
return 1;
}
else if(!IsPlayerInRangeOfPoint(playerid, 30, -2079.33032, 1564.73865, 19.41173))
{
SendClientMessage(playerid, COLOR_WHITE, "{FF0000}[ERROR]{FFFFFF} You are not near the gate.");
return 1;
}
}
else return SCM(playerid,COLOR_WHITE,"{FF0000}[ERROR]{FFFFFF} The gate is already used, Please wait ..");
}
return 1;
}