When i compile error
#1

when i compile this to my gamemode it has errors

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.
can anyone fix this
Reply
#2

Plzz..anyone will you reply
________________________

Btw..how can i post A server on this forum

cuz when people reply
they always shows the server ping,maxplayer,server name,mapname and others
Reply
#3

First you need to define or remove the unidentified symbols.
There is something wrong with this line: if(AccInfo[playerid][Level] >= 6. That's why it is asking you for a ;

This is all i can fix.

pawn Код:
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);
}

But if you want me to give you a fulyl working copy:

pawn Код:
dcmd_object(playerid,params[])
{
    if(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(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);
}
you need to be signed into the RCON. Also need to add:
dcmd(object,#,cmdtext);
underneath 'onplayercommandtext'.


Sorry i can't help any further. I don't use dcmd cause i'm noob:P
Reply
#4

add where i dont know where to add
Код:
dcmd(object,#,cmdtext);
Код:
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(17309) : error 035: argument type mismatch (argument 4)
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25411) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25458) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25458) : error 017: undefined symbol "dcmd_object"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25459) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25461) : error 017: undefined symbol "params"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25462) : error 017: undefined symbol "LIGHTBLUE2"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25464) : error 017: undefined symbol "params"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25466) : error 017: undefined symbol "SendCommandToAdmins"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25473) : error 017: undefined symbol "SaveIn"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25475) : error 017: undefined symbol "yellow"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25477) : error 017: undefined symbol "ErrorMessages"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25481) : warning 225: unreachable code
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25481) : error 017: undefined symbol "dcmd_pickup"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25484) : error 017: undefined symbol "params"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25485) : error 017: undefined symbol "LIGHTBLUE2"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25488) : warning 219: local variable "PickupID" shadows a variable at a preceding level
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25488) : error 017: undefined symbol "params"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25490) : error 017: undefined symbol "SendCommandToAdmins"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25497) : error 017: undefined symbol "SaveIn"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25499) : error 017: undefined symbol "yellow"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25488) : warning 204: symbol is assigned a value that is never used: "PickupID"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25501) : error 017: undefined symbol "ErrorMessages"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25504) : warning 225: unreachable code
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25504) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42624) : warning 203: symbol is never used: "IsLSPDDoorOpen"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


17 Errors.
do i need to put the pawn code all way down under my gamemode.??
example
pawn Код:
Gamemode..



















The pawn code
is that i need to do??
Reply
#5

when i put the pawn way down under the gamemode it has this errors

Код:
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(17309) : error 035: argument type mismatch (argument 4)
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25411) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(25457) : warning 217: loose indentation
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42579) : error 017: undefined symbol "AccInfo"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42579) : warning 215: expression has no effect
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42579) : error 001: expected token: ";", but found "]"
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42579) : error 029: invalid expression, assumed zero
C:\Users\Aztecas Dark Killer\Desktop\Samp Servers\Grand turisMo\Gamemodes\GT-RP.pwn(42579) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


5 Errors.
is this pawn correct??

pawn Код:
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);
}
i take this pawn code from Luxadmin
my server is roleplay it has 1337 level admin
so how can i change the pawn code for a roleplay script??
Код:
do i need to throw if(AccInfo[playerid][Level] >= 6 throw 6 and >=???
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)