newsamp.inc Pomoc

Započeo CoffinKing
pre 5 godina
936
pregleda
12
postova
Lazar Nerandzic
Street Runner
pre 5 godina
Problem(error/warning): Probao sam da compilujem skriptu i izaslo mi je ovo:
C:\Users\as\Desktop\Balkan Country \pawno\include\newsamp.inc(817) : error 025: function heading differs from prototype
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

1 Error.
Zna li neko kako da popravim ovo?

Dio skripte: Linija 817 je prazna
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log):
Slika/video ingame problema(obavezno ako je ingame problem): link slike
Balsa.
Crime Lord
pre 5 godina
Pošalji linije oko te prazne
Lazar Nerandzic
Street Runner
pre 5 godina
Ovo je ceo taj deo sto se tice toga, oznacio sam 817. liniju koja je prazna:
//==============================[ Organizacije ]==============================//

#define MAX_ORG 50
#define O_FILE "Organizacije/Organizacija_%d.ini"
#define ORG_IME 64
#define ORG_RANK 64
#define ORG_CLAN  24
#define ORG_LIDER 24
#define PORT_FILE "PortoviOrgi/Organizacija_%d.ini"

#define ORG_TIP_PD     1
#define ORG_TIP_BANDA 2
#define ORG_TIP_MAFIJA  3
#define ORG_TIP_MC 4
#define ORG_TIP_SR 5
#define ORG_TIP_MD 6
#define ORG_TIP_CNN 7
#define ORG_TIP_HITM 8
#define ORG_TIP_ELEK  9
#define ORG_TIP_TAXI 10
#define ORG_TIP_PS     11

#define CTIP_HEROIN    1
#define CTIP_KOKAIN    2
#define CTIP_BMETH    3
#define CTIP_MARIHUANA 4
#define CTIP_CRACK    5
#define CTIP_METH      6
//Ovo je 817. linija koja je prazna
enum oOrgInfo {
oID,
oName[ ORG_IME ],
oPreFix[ 10 ],
oColor[ 24 ],

oTip,
oSuspended,
oMaxClanova,
oUbacenihClanova,

    oSkin1,
oSkin2,
oSkin3,
oSkin4,
oSkin5,
oSkin6,

oZSkin1,
oZSkin2,
oZSkin3,
oZSkin4,
oZSkin5,
oZSkin6,

    oLider1[ ORG_LIDER ],
    oLider2[ ORG_LIDER ],

oClan1[ ORG_CLAN ],
oClan2[ ORG_CLAN ],
oClan3[ ORG_CLAN ],
oClan4[ ORG_CLAN ],
oClan5[ ORG_CLAN ],
oClan6[ ORG_CLAN ],
oClan7[ ORG_CLAN ],
oClan8[ ORG_CLAN ],
oClan9[ ORG_CLAN ],
oClan10[ ORG_CLAN ],
oClan11[ ORG_CLAN ],
oClan12[ ORG_CLAN ],
oClan13[ ORG_CLAN ],
oClan14[ ORG_CLAN ],
oClan15[ ORG_CLAN ],
oClan16[ ORG_CLAN ],
oClan17[ ORG_CLAN ],
oClan18[ ORG_CLAN ],
oClan19[ ORG_CLAN ],
oClan20[ ORG_CLAN ],
oClan21[ ORG_CLAN ],
oClan22[ ORG_CLAN ],
oClan23[ ORG_CLAN ],
oClan24[ ORG_CLAN ],
oClan25[ ORG_CLAN ],
oClan26[ ORG_CLAN ],
oClan27[ ORG_CLAN ],
oClan28[ ORG_CLAN ],
oClan29[ ORG_CLAN ],
oClan30[ ORG_CLAN ],

oRank1[ ORG_RANK ],
oRank2[ ORG_RANK ],
oRank3[ ORG_RANK ],
oRank4[ ORG_RANK ],
oRank5[ ORG_RANK ],
oRank6[ ORG_RANK ],

    Float:oPozExtX,
    Float:oPozExtY,
    Float:oPozExtZ,

    Float:oPozIntX,
    Float:oPozIntY,
    Float:oPozIntZ,

    Float:oDutyPoint[ 3 ],
    oDutyInt,
    oDutyVW,
    Float:oEquipPoint[ 3 ],
    oEquipInt,
    oEquipVW,

    oSavez,

    oMaxPort,
    oControlType,
    Float:oDrugField[ 3 ],
    Float:oSafePos[ 3 ],
    oSafeMoney,
    oSafeDrug[ 4 ],
    oSafeDrugCode[ 4 ],

    oInt,
    oVw
}
new OI[ MAX_ORG ][ oOrgInfo ];
new OrgPickup[ MAX_ORG ];
new Text3D:Org3D[ MAX_ORG ];
new Text3D:OrgDuty3D[ MAX_ORG ];
new Text3D:OrgEquip3D[ MAX_ORG ];
new DutyPointPickup[ MAX_ORG ];
new EquipPointPickup[ MAX_ORG ];
new OrgFieldPickup[ MAX_ORG ];
new Text3D:OrgField3d[ MAX_ORG ];
new OrgSafePickup[ MAX_ORG ];
new Text3D:OrgSafe3d[ MAX_ORG ];

enum Portes {
    Float:Pos1[ 3 ],
    Float:Pos2[ 3 ],
    Int[ 2 ],
    VW[ 2 ],
    Pickup[ 2 ]
}
new PortOP[ MAX_ORG ][ 10 ][ Portes ];
Exnas.pwn
Godfather
pre 5 godina
problem  ti je u newsamp.inc na liniji 817 ne u tvom modu
Lazar Nerandzic
Street Runner
pre 5 godina
Probao sam da prebacim taj include iz 4 razlicita gamemoda i svaki mi je isto izbacivao
Exnas.pwn
Godfather
pre 5 godina
koliko sam uspeo skontati na liniji 817 je

public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)


Verovatno i ti imas ovu funkciju u modu tkd proveri parametre da li su isti
Lazar Nerandzic
Street Runner
pre 5 godina
Isto pise kao kod tebe
Bryan123
Enforcer
pre 5 godina
CoffinKing wrote on June 16, 2020, 5:15 pm:
Isto pise kao kod tebe
Nije bitno kakvi su kod njega, ti uporedi u include i u svojom modu da li se poklapaju
Lazar Nerandzic
Street Runner
pre 5 godina
Ovaj prvi deo koji je poslao je takodje isti i u includu i u gamemodu
Lazar Nerandzic
Street Runner
pre 5 godina
Ispod OnPlayerTakeDamage u includu pise ovo:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
        if (Callback_IsDefined("OnPlayerFall") && weaponid == WEAPON_COLLISION)
        {
            if (bodypart == 3 && issuerid == INVALID_PLAYER_ID)
                {
                    new Float:health;

                GetPlayerHealth(playerid, health);

                        if (amount >= 10.0 && health > amount)
                        {
                            CallLocalFunction("OnPlayerFall", "df", playerid, amount);
                        }
                }
        }
    if (Callback_IsDefined("OnPlayerRamPlayer") && weaponid == WEAPON_VEHICLE && issuerid != INVALID_PLAYER_ID)
        {
            CallLocalFunction("OnPlayerRamPlayer", "dddf", playerid, issuerid, GetPlayerVehicleID(issuerid), amount);
        }
        if (Callback_IsDefined("OnPlayerBurning") && weaponid == WEAPON_FLAMETHROWER)
        {
            if (!BitFlag_Status(g_aPlayerData, e_cbBurning))
            {
                BitFlag_Set(g_aPlayerData, e_cbBurning);
                CallLocalFunction("OnPlayerBurning", "dd", playerid, 1);
        }
            g_aPlayerTicks = GetTickCount();
        }
        #if defined CB_OnPlayerTakeDamage
                return CB_OnPlayerTakeDamage(playerid, issuerid, amount, weaponid, bodypart);
        #else
                return 1;
        #endif
}


Dok u skripti pise ovo:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart) {

if( issuerid != INVALID_PLAYER_ID && issuerid != INVALID_PLAYER_ID && amount == 0 && weaponid == 0 && bodypart == 3 ) {
    format( globalstring, sizeof( globalstring ), "{FBE204}[{F81414}*{FBE204}] T-PROTECT(CK) // %s je kickovan sa servera. Razlog: "col_white"Command kill", ImeIgraca( issuerid ) );
AdminPoruka( SVETLOCRVENA, globalstring );
Kickovanje( issuerid, ""col_white"Ti si kickovan sa servera. Razlog: "col_bcogc"Command kill");
      return 0;
}

if( issuerid != INVALID_PLAYER_ID  ) {
if( OI[ PlayerInfo[ issuerid ][ xClan ] ][ oTip ] == ORG_TIP_PD && !IsPlayerInAnyVehicle( issuerid ) && !IsPlayerInAnyVehicle( playerid ) && GetWeapon( issuerid ) == 23 && ImaTazer[ issuerid ] == true && !AdminDuty[ playerid ] ) {
    if( GetFactionType( playerid ) == ORG_TIP_PD ) return SCM( issuerid, CRVENA, "Ne mozes tazovati PD!" );

new Float:Pos[ 3 ];
GetPlayerPos( playerid, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] );
if( IsPlayerInRangeOfPoint( issuerid, 6.0, Pos[ 0 ], Pos[ 1 ], Pos[ 2 ] ) ) {

format( globalstring, sizeof( globalstring ), "%s puca tazerom na %s-a i pogadja ga.", ImeIgraca( issuerid ), ImeIgraca( playerid ) );
PorukaRadius( 20.0, issuerid, globalstring, LJUBICASTA );
TogglePlayerControllable( playerid, false );

                /*if( Maskuse[ playerid ] == true ) {
            SetPlayerName( playerid, RealName[ playerid ] );
Maskuse[ playerid ] = false;
}*/

PlayerCuffed[ playerid ] = 1;
Toretto_SetPlayerHealth( playerid, 50 );
SetPVarInt( playerid, "CuffTimerCalled", 1 );
TazerTimer[ playerid ] = SetTimerEx("TazovanTajmer", 15000, false, "i", playerid );
OnePlayAnim( playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0 );
return 0;
}
        }
        /*if( NaDmEventu[ playerid ] == false && WARPInfo[ playerid ][ WARIgrac ] == -1 && !AdminDuty[ playerid ] && PlayerCuffed[ playerid ] == 0 ) {
        if( weaponid <= 42 ) {
        new Float:takeHealth = antiCheatCS[ playerid ][ TrueHealth ] - WeaponDamage[ weaponid ][ bodypart - 3 ];
        Toretto_SetPlayerHealth( playerid, takeHealth );
}
}*/

//printf( "%s je naneo %.0f demidza %s-u, oruzje: %d, deo tela: %d", ImeIgraca( issuerid ), amount, ImeIgraca( playerid ), weaponid, bodypart );
}
return 1;
}


Sad ne znam da li je do toga ili ?
Lazar Nerandzic
Street Runner
pre 5 godina
Pronasao sam i ovo na jednom od sajtova, ali ne razumem sta u mojoj skripti moze da bude problem:
Quote
Well its simple, read the include file your using and copy exactly what it says.

Example from VexdUM vexd_utilities.inc:

forward EntityTouch(pToucher, pTouched);

If you write in your script EntityTouch(id1, id2) its incorrect it needs to be the same as the forward function from the include file, EntityTouch(pToucher, pTouched)

Only forwards cause prototype header errors, normal natives are fine.
Lazar Nerandzic
Street Runner
pre 5 godina
Reseno.

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava