28.11.2010, 16:43
This is probably something simple, but ... I have added the macros to my script for the object functions as stated in the release thread, but I'm now getting this error when I try to compile:
Line 4758 is:
This happens on all lines that contain IsPlayerHoldingObject. Any ideas?
Regards.
pawn Код:
C:\Users\Noc\Desktop\Stuff\SAMP\gamemodes\LSX.pwn(4758) : error 001: expected token: ")", but found ";"
C:\Users\Noc\Desktop\Stuff\SAMP\gamemodes\LSX.pwn(4758) : error 036: empty statement
C:\Users\Noc\Desktop\Stuff\SAMP\gamemodes\LSX.pwn(4758) : error 029: invalid expression, assumed zero
C:\Users\Noc\Desktop\Stuff\SAMP\gamemodes\LSX.pwn(4758) : fatal error 107: too many error messages on one line
pawn Код:
CMD:mho(playerid, params[])
{
if(PlayerInfo[playerid][LoggedIn])
{
new Obj, Bone, Float:Xoff, Float: Yoff, Float: Zoff, Float: Xrot, Float: Yrot, Float: Zrot;
if(sscanf(params, "iiF(Xoff)F(Yoff)F(Zoff)F(Xrot)F(Xrot)F(Xrot)", Obj, Bone, Xoff, Yoff, Zoff, Xrot, Yrot, Zrot)) return SendClientMessage(playerid, Red, "USAGE: /sho [ObjectID] [Bone ID](1-16) Optional: [X] [Y] [Z] [X Rot] [Y Rot] [Z Rot]");
if(!IsValidObjectID(Obj)) return SendClientMessage(playerid, Red, "ERROR: That object ID is invalid, please try again!");
if(Bone < 1 || Bone > 16) return SendClientMessage(playerid, Red, "ERROR: Bone ID's are 1 - 16.");
if(IsPlayerHoldingObject(playerid)) // LINE 4758 <<<<<
{
StopPlayerHoldingObject(playerid);
}
SetPlayerHoldingObject(playerid, Obj, Bone, Xoff, Yoff, Zoff, Xrot, Yrot, Zrot);
PlayerInfo[playerid][HObjID] = Obj; PlayerInfo[playerid][HObjBone] = Bone;
PlayerInfo[playerid][HObjXoff] = Xoff; PlayerInfo[playerid][HObjYoff] = Yoff; PlayerInfo[playerid][HObjZoff] = Zoff;
PlayerInfo[playerid][HObjXrot] = Xrot;
PlayerInfo[playerid][HObjYrot] = Yrot;
PlayerInfo[playerid][HObjZrot] = Zrot;
CurrentHoldingOb[playerid] = Obj;
SendClientMessage(playerid, COLOR_GREEN, "Object successfully placed, to remove it use /rmho!");
}
else
{
SendClientMessage(playerid, Red, "ERROR: You need to login to use this command!");
}
return 1;
}
Regards.