Errors
#1

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerConnect(playerid)
{

CMD:r(playerid,params[])
{
    //police Radio
    if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 287)//replace this with your Cop Skin. If you have more than use use it as if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286...)
    {
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /r [text]");
        new name[24],msg[128];
        GetPlayerName(playerid,name,24);
        format(msg,128,"(BCSD Radio)Officer %s(%d): %s, Over.",name,playerid, params);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 285 GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 287) SendClientMessage(i,-1,msg); // same as above for skins
    }
    //FF/EMS Radio
    if(GetPlayerSkin(playerid) == 278 GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) //replace this with your FF/EMS Skin. If you have more than use use it as if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286...)
    {
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /r [text]");
        new name[24],msg[128];
        GetPlayerName(playerid,name,24);
        format(msg,128,"(BCFD Radio) %s(%d): %s, Over.",name,playerid, params);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 278 GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) SendClientMessage(i,-1,msg); // same as above for skins
    }
    return 1;
}

//Emergency Radio (FF/EMS/PD) /gr
CMD:er(playerid,params[])
{
    if(GetPlayerSkin(playerid) == 285) //replace this with your Cop Skins+FF/EMS Skins. if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286...)
    {
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /er [text]");
        new name[24],msg[128];
        GetPlayerName(playerid,name,24);
        format(msg,128,"(Emergency Radio) %s(%d): %s, Over.",name,playerid, params);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 285 GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 287 GetPlayerSkin == 278 GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) SendClientMessage(i,-1,msg); // same as above for skins
    }
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    return 1;
}

public OnVehicleSpawn(vehicleid)
{
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    return 1;
}

public OnPlayerText(playerid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/911", true))
{
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "911 Emergency what service you need?", "Police\nFire Dept", "Call", "Cancel");

    return 1;
}
   
    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
    return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
    return 1;
}

public OnRconCommand(cmd[])
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
    return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
    return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
    return 1;
}

public OnPlayerUpdate(playerid)
{
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
    return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
    return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
    return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)// They pressed the first button.
    {
    switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
        {
        case 1:// Our dialog!
            {
            switch(listitem)// Checking which listitem was selected
            {
                case 0:// The first item listed
                {
                    if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "[INFO]Type your message and the location.");
                    GivePlayerMoney(playerid, -0);
                    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
                }
                case 1: // The second item listed
                {
                    if(GetPlayerMoney(playerid) < 1) return SendClientMessage(playerid, 0xFFFFFF, "[INFO]Type your message and the location.");
                    GivePlayerMoney(playerid, 02);
                    SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_BEER);
                }

            }
            }
}
 }
return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
errors:

pawn Код:
C:\Documents and Settings\Luca\Desktop\911.pwn(57) : error 017: undefined symbol "r"
C:\Documents and Settings\Luca\Desktop\911.pwn(62) : error 017: undefined symbol "isnull"
C:\Documents and Settings\Luca\Desktop\911.pwn(65) : error 017: undefined symbol "params"
C:\Documents and Settings\Luca\Desktop\911.pwn(67) : error 001: expected token: ")", but found "-identifier-"
C:\Documents and Settings\Luca\Desktop\911.pwn(67) : warning 215: expression has no effect
C:\Documents and Settings\Luca\Desktop\911.pwn(67) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Luca\Desktop\911.pwn(67) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\911.pwn(67) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


7 Errors.
Please help +rep...
Reply
#2

pawn Код:
#include <ZCMD>
on top and what is line 67?
Reply
#3

pawn Код:
C:\Documents and Settings\Luca\Desktop\911.pwn(58) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\911.pwn(58) : error 017: undefined symbol "cmd_r"
C:\Documents and Settings\Luca\Desktop\911.pwn(58) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Luca\Desktop\911.pwn(58) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Reply
#4

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
#include <zcmd>
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    // Don't use these lines if it's a filterscript
    SetGameModeText("Blank Script");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}
CMD:r(playerid,params[])
{
    //police Radio
    if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 287)//replace this with your Cop Skin. If you have more than use use it as if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286...)
    {
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /r [text]");
        new name[24],msg[128];
        GetPlayerName(playerid,name,24);
        format(msg,128,"(BCSD Radio)Officer %s(%d): %s, Over.",name,playerid, params);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 285 GetPlayerSkin(playerid) == 283 || GetPlayerSkin(playerid) == 282 || GetPlayerSkin(playerid) == 288 || GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 287) SendClientMessage(i,-1,msg); // same as above for skins
    }
    //FF/EMS Radio
    if(GetPlayerSkin(playerid) == 278 GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) //replace this with your FF/EMS Skin. If you have more than use use it as if(GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286...)
    {
        if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /r [text]");
        new name[24],msg[128];
        GetPlayerName(playerid,name,24);
        format(msg,128,"(BCFD Radio) %s(%d): %s, Over.",name,playerid, params);
        for(new i=0;i<MAX_PLAYERS;i++)
        if(GetPlayerSkin(i) == 278 GetPlayerSkin(playerid) == 277 || GetPlayerSkin(playerid) == 275 || GetPlayerSkin(playerid) == 279 || GetPlayerSkin(playerid) == 274 || GetPlayerSkin(playerid) == 276) SendClientMessage(i,-1,msg); // same as above for skins
    }
    return 1;
}
try copying that and pasting it, the problem was you added that under onplayerconnect
Reply
#5

still have 4 errors....
Reply
#6

I think you miss the standard Include for scripting process.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)