Command Gate Problem
#1

Hello, I made a command available for opening and closing gate, but I have some errors.

Код:
new brama;

public OnGameModeInit() 
{
brama = CreateObject(975, 2720.122070, -2405.397705, 14.135151, 0, 0, -89.9999813789);

public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/open.gate", true)==0)){
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "*** Otwieranie bramy...");
MoveObject(brama, 2720.117676, -2396.808350, 14.135628, 5);
}
return 1;
}

if (strcmp(cmdtext, "/close.gate", true)==0)){
{
SendClientMessage(playerid, COLOR_ADMIN, "*** Zamykanie bramy...");
MoveObject(brama, 2720.122070, -2405.397705, 14.135151, 5);
}
return 1;
}

}
return 0;
}
Following errors:

Код:
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2376) : warning 213: tag mismatch
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2376) : error 029: invalid expression, assumed zero
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2384) : warning 225: unreachable code
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2384) : error 029: invalid expression, assumed zero
C:\Users\PUZI\Desktop\RPG TDM (all versions) + SA TDM\trans.pwn(2396) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
I aint kind of sure what is the problem, i suspect it might be the brackets, but which ones? Any help would be appreciated

Thanks and Regards
Puzi
Reply
#2

pawn Код:
new brama;//global variable
pawn Код:
public OnGameModeInit()
{
brama = CreateObject(975, 2720.122070, -2405.397705, 14.135151, 0, 0, -89.9999813789);
return 1;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/open.gate", cmdtext, true, 10) == 0)
    {
SendClientMessage(playerid, COLOR_LIGHTGREEN, "*** Otwieranie bramy...");
MoveObject(brama, 2720.117676, -2396.808350, 14.135628, 5);
return 1;
}

    if (strcmp("/close.gate", cmdtext, true, 11) == 0)
    {
SendClientMessage(playerid, COLOR_ADMIN, "*** Zamykanie bramy...");
MoveObject(brama, 2720.122070, -2405.397705, 14.135151, 5);
return 1;
}

return 0;
}

Reply
#3

Thanks a lot
Reply
#4

Quote:
Originally Posted by Puzi
Thanks a lot
np
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)