10.02.2013, 13:26
I get these errors with the code below.
pawn Код:
C:\Users\PC\Downloads\samp03x_svr_R1-2_win32\pawno\map.pwn(124) : error 029: invalid expression, assumed zero
C:\Users\PC\Downloads\samp03x_svr_R1-2_win32\pawno\map.pwn(129) : error 029: invalid expression, assumed zero
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/door", cmdtext, true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid,2,1435.58, 1532.59, 9.96))
{
new Float:RotX, Float:RotY, Float:RotZ;
GetObjectRot(door1,RotX,RotY,RotZ);
if RotZ == 90
{ //First error here.
SetObjectRot(door1,RotX,RotY,0);
return 1;
}
else if RotZ == 0
{ // Second here.
SetObjectRot(door1,RotX,RotY,90);
return 1;
}
}
return 1;
}
return 0;
}