string error
#1

need help with this i get these errors:
pawn Код:
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(11) : error 017: undefined symbol "string"
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(12) : warning 217: loose indentation
C:\Documents and Settings\BaLLy\Desktop\The Original\pawno\include\PPC_PlayerCommands.inc(12) : error 017: undefined symbol "string"
with this code:
pawn Код:
CMD:giveweapon(playerid,params[])
{
    SendAdminText(playerid, "/giveweapon", params);
    if (!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,0xFF0000FF,"You have to be admin to do this");
    new ID, GUN, AMMO;//Creates th variables
    if(sscanf(params, "uii", ID, GUN, AMMO)) return SendClientMessage(playerid,-1,"{ff0000}Usage: /giveweapon [id part of name] [gunid] [ammo]");//if the player enters the wrong params
    if(GUN == 0 || GUN >= 45) return SendClientMessage(playerid, -1, "Invalid gun id!");//if the gunid is invalid
    if(IsPlayerConnected(ID) && ID != INVALID_PLAYER_ID)//if the player is connected and is valid
    {
        GivePlayerWeapon(ID, GUN, AMMO);//Gives the GUN and AMMO specified
        format(string, 128, "Admin {ff0000}%s {00ff00}has given {ff0000}%s {00ff00}", AdminLevelName[APlayerData[playerid][PlayerLevel]], Name);
                    SendClientMessageToAll(0x00ff00FF,string);
    }
    return 1;
}
Reply
#2

pawn Код:
new string[128];
In the command.
Reply
#3

EDIT: REMOVED
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)