18.05.2011, 14:17
when i compile this to my gamemode it has errors
this is the pawn code
can anyone fix this
pawn Код:
//==============================================================================
// Pickups and Objects
//==============================================================================
dcmd_object(playerid,params[])
{
if(AccInfo[playerid][Level] >= 6 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /object [ObjectID]") &&
SendClientMessage(playerid, orange, "Function: Will created a specified Object");
new ObjID = strval(params), string[128];
new Float:X, Float:Y, Float:Z, Float:Ang;
SendCommandToAdmins(playerid,"Object");
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
X += (3 * floatsin(-Ang, degrees));
Y += (3 * floatcos(-Ang, degrees));
CreateObject(ObjID, X, Y, Z, 0.0, 0.0, Ang);
format(string, sizeof(string), "CreateObject(%d, %0.2f, %0.2f, %0.2f, 0.00, 0.00, %0.2f);", ObjID, X, Y, Z, Ang);
SaveIn("CreatedObjects",string);
format(string, sizeof(string), "|- Object Created: (Id: %d) (Position: X: %0.2f, Y: %0.2f, Z: %0.2f) (Angle: %0.2f) -|", ObjID, X, Y, Z, Ang);
return SendClientMessage(playerid,yellow, string);
}
else return ErrorMessages(playerid, 1);
}
dcmd_pickup(playerid,params[])
{
if(AccInfo[playerid][Level] >= 6 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return
SendClientMessage(playerid, LIGHTBLUE2, "Usage: /pickup [PickupID]") &&
SendClientMessage(playerid, orange, "Function: Will created a specified Pickup");
new PickupID = strval(params), string[128];
new Float:X, Float:Y, Float:Z, Float:Ang;
SendCommandToAdmins(playerid,"Pickup");
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
X += (3 * floatsin(-Ang, degrees));
Y += (3 * floatcos(-Ang, degrees));
CreatePickup(PickupID, 2, X+2, Y, Z);
format(string, sizeof(string), "CreatePickup(%d, 2, %0.2f, %0.2f, %0.2f);", PickupID, X+2, Y, Z);
SaveIn("CreatedPickups",string);
format(string, sizeof(string), "|- Pickup Created: (Id: %d) (Position: X: %0.2f, Y: %0.2f, Z: %0.2f) -|", PickupID, X+2, Y, Z);
return SendClientMessage(playerid,yellow, string);
}
else return ErrorMessages(playerid, 1);
}
this is the pawn code
Код:
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25410) : warning 217: loose indentation C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25455) : warning 217: loose indentation C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25477) : warning 217: loose indentation C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25477) : error 017: undefined symbol "dcmd_object" C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25479) : error 017: undefined symbol "AccInfo" C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25479) : warning 215: expression has no effect C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25479) : error 001: expected token: ";", but found "]" C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25479) : error 029: invalid expression, assumed zero C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25479) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.
![Huh?](images/smilies/confused.gif)