[Ajuda] Uma coisa MUITO Errada .-.
#1

Estava fazendo um FS com os TextDraws. Vi em um tutorial e segui ele.

Tipo, Eu jб coloquei todos as coordenadas, dкem uma olhada.

Erro:

Quote:

D:\SAMP\pawno\arp fix.pwn(64) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(72) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(82) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(82) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(92) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(92) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(92) : error 004: function "OnFilterScriptExit" is not implemented
D:\SAMP\pawno\arp fix.pwn(93) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(114) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(114) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(114) : error 004: function "OnGameModeInit" is not implemented
D:\SAMP\pawno\arp fix.pwn(122) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(122) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(122) : error 004: function "OnGameModeExit" is not implemented
D:\SAMP\pawno\arp fix.pwn(127) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(127) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(127) : error 004: function "OnPlayerRequestClass" is not implemented
D:\SAMP\pawno\arp fix.pwn(135) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(135) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(135) : error 004: function "OnPlayerConnect" is not implemented
D:\SAMP\pawno\arp fix.pwn(137) : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(13 : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(139) : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(143) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(143) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(143) : error 004: function "OnPlayerDisconnect" is not implemented
D:\SAMP\pawno\arp fix.pwn(14 : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(14 : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(14 : error 004: function "OnPlayerSpawn" is not implemented
D:\SAMP\pawno\arp fix.pwn(153) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(153) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(153) : error 004: function "OnPlayerDeath" is not implemented
D:\SAMP\pawno\arp fix.pwn(15 : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(15 : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(15 : error 004: function "OnVehicleSpawn" is not implemented
D:\SAMP\pawno\arp fix.pwn(163) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(163) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(163) : error 004: function "OnVehicleDeath" is not implemented
D:\SAMP\pawno\arp fix.pwn(16 : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(16 : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(16 : error 004: function "OnPlayerText" is not implemented
D:\SAMP\pawno\arp fix.pwn(173) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(173) : error 029: invalid expression, assumed zero

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


26 Errors.



FS:

pawn Код:
/* Este й um GameFIX para Alpha RP se vocк conseguiu isto sem minha permissгo, parabйns (Y)
            Vocк pode enfiar no rabo isso .-. */

#define FILTERSCRIPT

// Cores do /desenvolvedores

#define COR_LARANJA 0xF07A00FF
#define COR_BRANCO 0xFFFFFFFF
#define COR_VERMELHO 0xFF0000FF

#include <a_samp>
#include <a_players>

//Textdraws
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("ARP Fix 0.1 Carregado");
    print("by Stewie");
   
    DisableInteriorEnterExits();
    EnableStuntBonusForAll(0);
    ShowNameTags(1);
    SetNameTagDrawDistance(40.0);
    SetGameModeText("AlphaRP 0.1");
    SendRconCommand("SP - RJ ARP MOD");
    SendRconCommand("[BR] Alpha RolePlay SP/RJ [0.3b] [DEV]");
   
    //Textdraws

    Textdraw0 = TextDrawCreate(646.000000, 436.000000, "ARP");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.100000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 50);
    TextDrawTextSize(Textdraw0, -3.000000, 2.000000);
   
    for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw0);
        }
    }

    Textdraw1 = TextDrawCreate(20.000000, 436.000000, "alpharp.tk");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 3);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);

for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw1);
        }
    }
   
    Textdraw2 = TextDrawCreate(594.000000, 437.000000, "0.1.2");
    TextDrawBackgroundColor(Textdraw2, 255);
    TextDrawFont(Textdraw2, 1);
    TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
    TextDrawColor(Textdraw2, -1);
    TextDrawSetOutline(Textdraw2, 0);
    TextDrawSetProportional(Textdraw2, 1);
    TextDrawSetShadow(Textdraw2, 1);
    return 1;

for(new i; i < MAX_PLAYERS; i ++)
    {
        if(IsPlayerConnected(i))
        {
            TextDrawShowForPlayer(i, Textdraw2);
        }
    }

   

    public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    TextDrawHideForAll(Textdraw1);
    TextDrawDestroy(Textdraw1);
    TextDrawHideForAll(Textdraw2);
    TextDrawDestroy(Textdraw2);
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" ARP GameFIX 0.1");
    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)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    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("/desenvolvedores", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, COR_LARANJA, "           Desenvolvedores           ");
        SendClientMessage(playerid, COR_BRANCO, "|===================================|");
        SendClientMessage(playerid, COR_VERMELHO, "| - Fundador                  Stewie|");
        SendClientMessage(playerid, COR_VERMELHO, "| - Fundador                  Victor|");
        SendClientMessage(playerid, COR_BRANCO, "|===================================|");
        // Do something here
        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[])
{
    return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
Reply
#2

So de vista, qpelo que eu sei, retire:

#if defined FILTERSCRIPT ;

coloque:
#include <a_samp> e #include <a_players> a cima de #define FILTERSCRIPT ;
retire #else e #endif.
Reply
#3

pawn Код:
D:\SAMP\pawno\arp fix.pwn(66) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(74) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(84) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(84) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(94) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(94) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(94) : error 004: function "OnFilterScriptExit" is not implemented
D:\SAMP\pawno\arp fix.pwn(95) : warning 217: loose indentation
D:\SAMP\pawno\arp fix.pwn(107) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(107) : error 017: undefined symbol "main"
D:\SAMP\pawno\arp fix.pwn(116) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(116) : error 004: function "OnGameModeInit" is not implemented
D:\SAMP\pawno\arp fix.pwn(124) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(124) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(124) : error 004: function "OnGameModeExit" is not implemented
D:\SAMP\pawno\arp fix.pwn(129) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(129) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(129) : error 004: function "OnPlayerRequestClass" is not implemented
D:\SAMP\pawno\arp fix.pwn(137) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(137) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(137) : error 004: function "OnPlayerConnect" is not implemented
D:\SAMP\pawno\arp fix.pwn(139) : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(140) : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(141) : error 017: undefined symbol "playerid"
D:\SAMP\pawno\arp fix.pwn(145) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(145) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(145) : error 004: function "OnPlayerDisconnect" is not implemented
D:\SAMP\pawno\arp fix.pwn(150) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(150) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(150) : error 004: function "OnPlayerSpawn" is not implemented
D:\SAMP\pawno\arp fix.pwn(155) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(155) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(155) : error 004: function "OnPlayerDeath" is not implemented
D:\SAMP\pawno\arp fix.pwn(160) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(160) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(160) : error 004: function "OnVehicleSpawn" is not implemented
D:\SAMP\pawno\arp fix.pwn(165) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(165) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(165) : error 004: function "OnVehicleDeath" is not implemented
D:\SAMP\pawno\arp fix.pwn(170) : warning 225: unreachable code
D:\SAMP\pawno\arp fix.pwn(170) : error 029: invalid expression, assumed zero
D:\SAMP\pawno\arp fix.pwn(170) : error 004: function "OnPlayerText" is not implemented

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


26 Errors.

й o que hб :/
Reply
#4

1Є Nunca copie tudo do FS para o GM.
2Є FilterScriptExit = GameModeExit = Copiar as coisas certin para o GM
3Є FilterScritpInit = GameModeInit = Copiar as coisas certin para o GM
4Є Warning = Perigo = Pode ter algo igual
5Є Verifique se tem "public" iguais dentro do GameMode.
Reply
#5

Isso de 26 erros й geralmente pro causa das chaves ( { } ). Coloque:
Antes do "public OnFilterScriptExit()" , uma chave "}" sem as aspas. Notei que falta uma
Reply
#6

Como eu sou um homem de bom coraзгo, ta na mгo:
Existe uma funзгo chamada TextDrawShowForAll(TEXT); use-a, para nгo ficar enchendo de loopis
pawn Код:
/* Este й um GameFIX para Alpha RP se vocк conseguiu isto sem minha permissгo, parabйns (Y)
            Vocк pode enfiar no rabo isso .-. */

#define FILTERSCRIPT

// Cores do /desenvolvedores

#define COR_LARANJA 0xF07A00FF
#define COR_BRANCO 0xFFFFFFFF
#define COR_VERMELHO 0xFF0000FF

#include <a_samp>
#include <a_players>
#if defined FILTERSCRIPT
//Textdraws
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;



public OnFilterScriptInit()
{
   
   
    print("ARP Fix 0.1 Carregado");
    print("by Stewie");

    DisableInteriorEnterExits();
    EnableStuntBonusForAll(0);
    ShowNameTags(1);
    SetNameTagDrawDistance(40.0);
    SetGameModeText("AlphaRP 0.1");
    SendRconCommand("SP - RJ ARP MOD");
    SendRconCommand("[BR] Alpha RolePlay SP/RJ [0.3b] [DEV]");

    Textdraw0 = TextDrawCreate(646.000000, 436.000000, "ARP");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 1.100000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 50);
    TextDrawTextSize(Textdraw0, -3.000000, 2.000000);

    Textdraw1 = TextDrawCreate(20.000000, 436.000000, "alpharp.tk");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 3);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);

    Textdraw2 = TextDrawCreate(594.000000, 437.000000, "0.1.2");
    TextDrawBackgroundColor(Textdraw2, 255);
    TextDrawFont(Textdraw2, 1);
    TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
    TextDrawColor(Textdraw2, -1);
    TextDrawSetOutline(Textdraw2, 0);
    TextDrawSetProportional(Textdraw2, 1);
    TextDrawSetShadow(Textdraw2, 1);
    TextDrawShowForAll(Textdraw2);
    return 1;
}
public OnFilterScriptExit()
{
    TextDrawHideForAll(Textdraw0);
    TextDrawDestroy(Textdraw0);
    TextDrawHideForAll(Textdraw1);
    TextDrawDestroy(Textdraw1);
    TextDrawHideForAll(Textdraw2);
    TextDrawDestroy(Textdraw2);
    return 1;
}
public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, Textdraw0);
    TextDrawShowForPlayer(playerid, Textdraw1);
    TextDrawShowForPlayer(playerid, Textdraw2);
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/desenvolvedores", cmdtext, true) == 0)
    {
        SendClientMessage(playerid, COR_LARANJA, "           Desenvolvedores           ");
        SendClientMessage(playerid, COR_BRANCO, "|===================================|");
        SendClientMessage(playerid, COR_VERMELHO, "| - Fundador                  Stewie|");
        SendClientMessage(playerid, COR_VERMELHO, "| - Fundador                  Victor|");
        SendClientMessage(playerid, COR_BRANCO, "|===================================|");
        return 1;
    }
    return 0;
}
#endif
Reply
#7

Bom coraзгo? Valeu, vey. ajudou muito. =D
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)