moveable gate ,i got error -
Aizen - 16.05.2011
This is shit,i never got this error ,this error
Код:
D:\filterscripts\VIP2_gate.pwn(37) : error 030: compound statement not closed at the end of file (started at line 29)
Help me please...
This is my pawno code
Код:
#include <a_samp>
new gateopen;
public OnFilterScriptInit()
{
CreateObject(987,1804.51342773,-1276.65783691,12.63281250,0.00000000,0.00000000,12.00000000); //object(elecfence_bar) (1)
gateopen = CreateObject(971,1801.08056641,-1279.14318848,14.95273018,0.00000000,0.00000000,34.00000000); //object(subwaygate) (1)
CreateObject(987,1787.85278320,-1288.40417480,12.63281250,0.00000000,0.00000000,36.00000000); //object(elecfence_bar) (2)
CreateObject(987,1778.49719238,-1295.33276367,12.64053726,0.00000000,0.00000000,38.00000000); //object(elecfence_bar) (3)
CreateObject(7956,1765.57763672,-1325.54809570,97.08969116,0.00000000,0.00000000,0.00000000); //object(vgwcuntwall1) (1)
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aptopen", true) == 0){
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,7.70273018,1.5);
return 1;
}
}
if(strcmp(cmdtext, "/aptclose", true) == 0){
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,14.95273018,1.5);
return 1;
}
return 0;
}
Re: moveable gate ,i got error -
Biesmen - 16.05.2011
You forgot to close the callback OnPlayerCommandText.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aptopen", true) == 0){
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,7.70273018,1.5);
return 1;
}
}
if(strcmp(cmdtext, "/aptclose", true) == 0){
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,14.95273018,1.5);
return 1;
}
return 1;
}
return 0;
}
Re: moveable gate ,i got error -
Aizen - 16.05.2011
Now i got this,
Код:
D:\filterscripts\VIP2_gate.pwn(35) : warning 225: unreachable code
D:\filterscripts\VIP2_gate.pwn(37) : error 030: compound statement not closed at the end of file (started at line 19)
Re: moveable gate ,i got error -
Biesmen - 16.05.2011
Oh, didn't see, you also have two opening braces at every command.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext, "/aptopen", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,7.70273018,1.5);
}
return 1;
}
if(strcmp(cmdtext, "/aptclose", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid,10,1801.08056641,-1279.14318848,7.70273018))
{
MoveObject(gateopen,1801.08056641,-1279.14318848,14.95273018,1.5);
}
return 1;
}
return 0;
}
Re: moveable gate ,i got error -
Aizen - 16.05.2011
Thanks man....,you are hero xD