Empty statement -
Louris - 03.12.2012
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_HORN )
{
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1477.21, 1750.11, 9.29))
{
{
if(GetPVarInt(playerid, "liftas") == 0)
{
MoveDynamicObject(liftas, 1480.31, 1746.09, 96.01, 5.0);
SetPVarInt(playerid, "liftas", 1);
GameTextForPlayer(playerid, "~G~ Keliates Aukstyn!", 2000, 5);
}
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1480.31, 1746.09, 96.01));
else if(GetPVarInt(playerid, "liftas") == 1)
{
MoveDynamicObject(liftas, 1481.07, 1744.07, 9.35, 5.0);
SetPVarInt(playerid, "liftas", 0);
GameTextForPlayer(playerid, "~R~ Keliates zemyn!", 2000, 5);
}
Error: C:\Users\Lauryno\Desktop\Servas\filterscripts\obje ktai.pwn(203) : error 036: empty statement
Re: Empty statement -
[HK]Ryder[AN] - 03.12.2012
this
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_HORN )
{
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1477.21, 1750.11, 9.29))
{
if(GetPVarInt(playerid, "liftas") == 0)
{
MoveDynamicObject(liftas, 1480.31, 1746.09, 96.01, 5.0);
SetPVarInt(playerid, "liftas", 1);
GameTextForPlayer(playerid, "~G~ Keliates Aukstyn!", 2000, 5);
}
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1480.31, 1746.09, 96.01));
else if(GetPVarInt(playerid, "liftas") == 1)
{
MoveDynamicObject(liftas, 1481.07, 1744.07, 9.35, 5.0);
SetPVarInt(playerid, "liftas", 0);
GameTextForPlayer(playerid, "~R~ Keliates zemyn!", 2000, 5);
}
Re: Empty statement -
tyler12 - 03.12.2012
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_HORN )
{
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1477.21, 1750.11, 9.29))
{
if(GetPVarInt(playerid, "liftas") == 0)
{
MoveDynamicObject(liftas, 1480.31, 1746.09, 96.01, 5.0);
SetPVarInt(playerid, "liftas", 1);
GameTextForPlayer(playerid, "~G~ Keliates Aukstyn!", 2000, 5);
}
else if(GetPVarInt(playerid, "liftas") == 1)
{
MoveDynamicObject(liftas, 1481.07, 1744.07, 9.35, 5.0);
SetPVarInt(playerid, "liftas", 0);
GameTextForPlayer(playerid, "~R~ Keliates zemyn!", 2000, 5);
}
}
}
return 1;
}
Re: Empty statement -
Vince - 03.12.2012
Why do you people insist on posting the whole code, without even telling what was actually wrong? Just give the guy the answer he's looking for so he can fix this (very minor) mistake himself. You don't learn anything from being served on a golden platter.
Re: Empty statement -
Louris - 03.12.2012
Ryder, still get errors, tyler, you just removed error line..
Re: Empty statement -
Konstantinos - 03.12.2012
If this what you want.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if( newkeys == KEY_HORN )
{
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1477.21, 1750.11, 9.29))
{
if(GetPVarInt(playerid, "liftas") == 0)
{
MoveDynamicObject(liftas, 1480.31, 1746.09, 96.01, 5.0);
SetPVarInt(playerid, "liftas", 1);
GameTextForPlayer(playerid, "~G~ Keliates Aukstyn!", 2000, 5);
}
}
if(IsPlayerInRangeOfPoint(playerid, 20.0 , 1480.31, 1746.09, 96.01))
{
if(GetPVarInt(playerid, "liftas") == 1)
{
MoveDynamicObject(liftas, 1481.07, 1744.07, 9.35, 5.0);
SetPVarInt(playerid, "liftas", 0);
GameTextForPlayer(playerid, "~R~ Keliates zemyn!", 2000, 5);
}
}
}
// rest
The errors means that you have an if statement which is empty. You need to open a bracket, write some part of code in it and close the bracket.
Re: Empty statement -
Louris - 03.12.2012
Dwane thanks, works perfect!