[Ajuda/Erro]SaveNeon
#1

Boas pessoal, 1є topico de hoje

Alguem me pode dizer o que ta mal aqui ? fis save neon em dini e deume 26 erros :/ agradeзo pela ajuda :P


pawn Код:
#include <a_samp>
#include <dini>
/* TUNING SAVER BY BLACKFOX */
forward TuneThisCar(vehicleid);
forward LoadModsForAll(vehicleid);
forward SaveModsForAll(vehicleid);
new spoiler[7][0] = {
    {18648},
    {18647},
    {18649},
    {18652},
    {18651},
    {18650},
    {18646}
};

enum tInfo
{
    mod1,
    mod2,
    mod3,
    mod4,
    mod5,
    mod6,
    mod7,
    mod8,
    mod9,
    mod10,
    mod11
}
new TuneCar[MAX_VEHICLES][tInfo];

#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" BlackFoX's Tuning SaVe");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
}

#endif

public OnGameModeInit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    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 OnPlayerPrivmsg(playerid, recieverid, text[])
{
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    return 0;
}

public OnPlayerInfoChange(playerid)
{
    return 1;
}

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

public OnPlayerExitVehicle(playerid, vehicleid)
{
    SaveModsForAll(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 OnObjectMoved(objectid)
{
    return 1;
}

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

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

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

public OnPlayerExitedMenu(playerid)
{
    return 1;
}
//
public TuneThisCar(vehicleid)
{
        if(TuneCar[vehicleid][mod1]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod1]); }
        if(TuneCar[vehicleid][mod2]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod2]); }
        if(TuneCar[vehicleid][mod3]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod3]); }
        if(TuneCar[vehicleid][mod4]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod4]); }
        if(TuneCar[vehicleid][mod5]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod5]); }
        if(TuneCar[vehicleid][mod6]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod6]); }
        if(TuneCar[vehicleid][mod7]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod7]); }
        if(TuneCar[vehicleid][mod8]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod8]); }
        if(TuneCar[vehicleid][mod9]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod9]); }
        if(TuneCar[vehicleid][mod10]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod10]); }
        if(TuneCar[vehicleid][mod11]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod11]); }
        {
}
InitComponents(componentid)
{
    new i;
    for(i=0; i<7; i++)
    {
        if(spoiler[i][0]==componentid) { return 1; }
 }
 
//
public OnVehicleMod(playerid,vehicleid,componentid)
{
new Varz=InitComponents(componentid);
switch (Varz)
{
case 1: { TuneCar[vehicleid][mod1]=componentid; }
case 2: { TuneCar[vehicleid][mod2]=componentid; }
case 3: { TuneCar[vehicleid][mod3]=componentid; }
case 4: { TuneCar[vehicleid][mod4]=componentid; }
case 5: { TuneCar[vehicleid][mod5]=componentid; }
case 6: { TuneCar[vehicleid][mod6]=componentid; }
case 7: { TuneCar[vehicleid][mod7]=componentid; }
case 8: { TuneCar[vehicleid][mod8]=componentid; }
case 9: { TuneCar[vehicleid][mod9]=componentid; }
case 10: { TuneCar[vehicleid][mod10]=componentid; }
case 11: { TuneCar[vehicleid][mod11]=componentid; }
}
printf("Component Added: %d",componentid);
SaveModsForAll(vehicleid);
return 1;
}

public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
{
TuneCar[vehicleid][paintjob]=paintjobid;
return 1;
}
//

public LoadModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
TuneCar[vehicleid][mod1] = dini_Int(formatLD, "mod1");
TuneCar[vehicleid][mod2] = dini_Int(formatLD, "mod2");
TuneCar[vehicleid][mod3] = dini_Int(formatLD, "mod3");
TuneCar[vehicleid][mod4] = dini_Int(formatLD, "mod4");
TuneCar[vehicleid][mod5] = dini_Int(formatLD, "mod5");
TuneCar[vehicleid][mod6] = dini_Int(formatLD, "mod6");
TuneCar[vehicleid][mod7] = dini_Int(formatLD, "mod7");
TuneCar[vehicleid][mod8] = dini_Int(formatLD, "mod8");
TuneCar[vehicleid][mod9] = dini_Int(formatLD, "mod9");
TuneCar[vehicleid][mod10] = dini_Int(formatLD, "mod10");
TuneCar[vehicleid][mod11] = dini_Int(formatLD, "mod11");
}
else
{
dini_Create(formatLD);
}
return 0;
}
public SaveModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
else
{
dini_Create(formatLD);
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
return 0;
}
public OnVehicleRespray(playerid,vehicleid, color1, color2)
{
TuneCar[vehicleid][colorA] = color1;
TuneCar[vehicleid][colorB] = color2;
return 1;
}
Reply
#2

Erros?
Reply
#3

Desculpa esquecime de emter os erros xD


Код:
:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(113) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(123) : warning 235: public function lacks forward declaration (symbol "OnPlayerInfoChange")
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(130) : error 004: function "LoadModsForAll" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(137) : error 004: function "SaveModsForAll" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(211) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(211) : error 017: undefined symbol "InitComponents"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(216) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(220) : warning 217: loose indentation
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(220) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(220) : error 004: function "OnVehicleMod" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(222) : error 017: undefined symbol "InitComponents"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(225) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(226) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(227) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(228) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(229) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(230) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(231) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(232) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(233) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(234) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(235) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(237) : error 017: undefined symbol "componentid"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(238) : error 004: function "SaveModsForAll" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(242) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(242) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(242) : error 004: function "OnVehiclePaintjob" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(244) : error 017: undefined symbol "paintjob"
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(249) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(249) : error 029: invalid expression, assumed zero
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(249) : error 004: function "LoadModsForAll" is not implemented
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(273) : warning 225: unreachable code
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(273) : error 029: invalid expression, assumed zero

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


26 Errors.
Reply
#4

Chaves..
Verifique e meta as chaves.

@EDIT
Look
Sobrou 3 warnings estou ocupado tente consertб-los.
pawn Код:
#include <a_samp>
#include <dini>
/* TUNING SAVER BY BLACKFOX */
forward TuneThisCar(vehicleid);
forward LoadModsForAll(vehicleid);
forward SaveModsForAll(vehicleid);

new colorA;
new colorB;
new paintjob;

new spoiler[7][0] = {
    {18648},
    {18647},
    {18649},
    {18652},
    {18651},
    {18650},
    {18646}
};

enum tInfo
{
    mod1,
    mod2,
    mod3,
    mod4,
    mod5,
    mod6,
    mod7,
    mod8,
    mod9,
    mod10,
    mod11
}
new TuneCar[MAX_VEHICLES][tInfo];

#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" BlackFoX's Tuning SaVe");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
}

#endif

public OnGameModeInit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    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[])
{
    return 0;
}

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

public OnPlayerExitVehicle(playerid, vehicleid)
{
    SaveModsForAll(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 OnObjectMoved(objectid)
{
    return 1;
}

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

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

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

public OnPlayerExitedMenu(playerid)
{
    return 1;
}
//
public TuneThisCar(vehicleid)
{
        if(TuneCar[vehicleid][mod1]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod1]); }
        if(TuneCar[vehicleid][mod2]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod2]); }
        if(TuneCar[vehicleid][mod3]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod3]); }
        if(TuneCar[vehicleid][mod4]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod4]); }
        if(TuneCar[vehicleid][mod5]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod5]); }
        if(TuneCar[vehicleid][mod6]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod6]); }
        if(TuneCar[vehicleid][mod7]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod7]); }
        if(TuneCar[vehicleid][mod8]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod8]); }
        if(TuneCar[vehicleid][mod9]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod9]); }
        if(TuneCar[vehicleid][mod10]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod10]); }
        if(TuneCar[vehicleid][mod11]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod11]); }
        return 1;
}
InitComponents(componentid)
{
    new i;
    for(i=0; i<7; i++)
    {
        if(spoiler[i][0]==componentid)
        {
        return 1;
        }
    }
    return 1;
}

//
public OnVehicleMod(playerid,vehicleid,componentid)
{
new Varz=InitComponents(componentid);
switch (Varz)
{
case 1: { TuneCar[vehicleid][mod1]=componentid; }
case 2: { TuneCar[vehicleid][mod2]=componentid; }
case 3: { TuneCar[vehicleid][mod3]=componentid; }
case 4: { TuneCar[vehicleid][mod4]=componentid; }
case 5: { TuneCar[vehicleid][mod5]=componentid; }
case 6: { TuneCar[vehicleid][mod6]=componentid; }
case 7: { TuneCar[vehicleid][mod7]=componentid; }
case 8: { TuneCar[vehicleid][mod8]=componentid; }
case 9: { TuneCar[vehicleid][mod9]=componentid; }
case 10: { TuneCar[vehicleid][mod10]=componentid; }
case 11: { TuneCar[vehicleid][mod11]=componentid; }
}
printf("Component Added: %d",componentid);
SaveModsForAll(vehicleid);
return 1;
}

public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
{
TuneCar[vehicleid][paintjob] = paintjobid;
return 1;
}
//

public LoadModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
TuneCar[vehicleid][mod1] = dini_Int(formatLD, "mod1");
TuneCar[vehicleid][mod2] = dini_Int(formatLD, "mod2");
TuneCar[vehicleid][mod3] = dini_Int(formatLD, "mod3");
TuneCar[vehicleid][mod4] = dini_Int(formatLD, "mod4");
TuneCar[vehicleid][mod5] = dini_Int(formatLD, "mod5");
TuneCar[vehicleid][mod6] = dini_Int(formatLD, "mod6");
TuneCar[vehicleid][mod7] = dini_Int(formatLD, "mod7");
TuneCar[vehicleid][mod8] = dini_Int(formatLD, "mod8");
TuneCar[vehicleid][mod9] = dini_Int(formatLD, "mod9");
TuneCar[vehicleid][mod10] = dini_Int(formatLD, "mod10");
TuneCar[vehicleid][mod11] = dini_Int(formatLD, "mod11");
}
else
{
dini_Create(formatLD);
}
return 0;
}
public SaveModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
else
{
dini_Create(formatLD);
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
return 0;
}
public OnVehicleRespray(playerid,vehicleid, color1, color2)
{
TuneCar[vehicleid][colorA] = color1;
TuneCar[vehicleid][colorB] = color2;
return 1;
}
Reply
#5

deume estes vvarings, vejam


Код:
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(244) : warning 213: tag mismatch
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(308) : warning 213: tag mismatch
C:\Users\Ricardo\Desktop\Server Sa-mp 0.3c\filterscripts\SaveNeon.pwn(309) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
o que ta mal aqui ? agradeзo

pawn Код:
#include <a_samp>
#include <dini>
/* TUNING SAVER BY BLACKFOX */
forward TuneThisCar(vehicleid);
forward LoadModsForAll(vehicleid);
forward SaveModsForAll(vehicleid);

new colorA;
new colorB;
new paintjob;

new spoiler[7][0] = {
    {18648},
    {18647},
    {18649},
    {18652},
    {18651},
    {18650},
    {18646}
};

enum tInfo
{
    mod1,
    mod2,
    mod3,
    mod4,
    mod5,
    mod6,
    mod7,
    mod8,
    mod9,
    mod10,
    mod11
}
new TuneCar[MAX_VEHICLES][tInfo];

#define FILTERSCRIPT

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" BlackFoX's Tuning SaVe");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
}

#endif

public OnGameModeInit()
{
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    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[])
{
    return 0;
}

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

public OnPlayerExitVehicle(playerid, vehicleid)
{
    SaveModsForAll(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 OnObjectMoved(objectid)
{
    return 1;
}

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

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

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

public OnPlayerExitedMenu(playerid)
{
    return 1;
}
//
public TuneThisCar(vehicleid)
{
        if(TuneCar[vehicleid][mod1]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod1]); }
        if(TuneCar[vehicleid][mod2]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod2]); }
        if(TuneCar[vehicleid][mod3]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod3]); }
        if(TuneCar[vehicleid][mod4]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod4]); }
        if(TuneCar[vehicleid][mod5]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod5]); }
        if(TuneCar[vehicleid][mod6]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod6]); }
        if(TuneCar[vehicleid][mod7]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod7]); }
        if(TuneCar[vehicleid][mod8]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod8]); }
        if(TuneCar[vehicleid][mod9]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod9]); }
        if(TuneCar[vehicleid][mod10]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod10]); }
        if(TuneCar[vehicleid][mod11]!=0) { AddVehicleComponent(vehicleid,TuneCar[vehicleid][mod11]); }
        return 1;
}
InitComponents(componentid)
{
    new i;
    for(i=0; i<7; i++)
    {
        if(spoiler[i][0]==componentid)
        {
        return 1;
        }
    }
    return 1;
}

//
public OnVehicleMod(playerid,vehicleid,componentid)
{
new Varz=InitComponents(componentid);
switch (Varz)
{
case 1: { TuneCar[vehicleid][mod1]=componentid; }
case 2: { TuneCar[vehicleid][mod2]=componentid; }
case 3: { TuneCar[vehicleid][mod3]=componentid; }
case 4: { TuneCar[vehicleid][mod4]=componentid; }
case 5: { TuneCar[vehicleid][mod5]=componentid; }
case 6: { TuneCar[vehicleid][mod6]=componentid; }
case 7: { TuneCar[vehicleid][mod7]=componentid; }
case 8: { TuneCar[vehicleid][mod8]=componentid; }
case 9: { TuneCar[vehicleid][mod9]=componentid; }
case 10: { TuneCar[vehicleid][mod10]=componentid; }
case 11: { TuneCar[vehicleid][mod11]=componentid; }
}
printf("Component Added: %d",componentid);
SaveModsForAll(vehicleid);
return 1;
}

public OnVehiclePaintjob(playerid,vehicleid, paintjobid)
{
TuneCar[vehicleid][paintjob] = paintjobid;
return 1;
}
//

public LoadModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
TuneCar[vehicleid][mod1] = dini_Int(formatLD, "mod1");
TuneCar[vehicleid][mod2] = dini_Int(formatLD, "mod2");
TuneCar[vehicleid][mod3] = dini_Int(formatLD, "mod3");
TuneCar[vehicleid][mod4] = dini_Int(formatLD, "mod4");
TuneCar[vehicleid][mod5] = dini_Int(formatLD, "mod5");
TuneCar[vehicleid][mod6] = dini_Int(formatLD, "mod6");
TuneCar[vehicleid][mod7] = dini_Int(formatLD, "mod7");
TuneCar[vehicleid][mod8] = dini_Int(formatLD, "mod8");
TuneCar[vehicleid][mod9] = dini_Int(formatLD, "mod9");
TuneCar[vehicleid][mod10] = dini_Int(formatLD, "mod10");
TuneCar[vehicleid][mod11] = dini_Int(formatLD, "mod11");
}
else
{
dini_Create(formatLD);
}
return 0;
}
public SaveModsForAll(vehicleid)
{
new formatLD[256];
format(formatLD,sizeof(formatLD),"neon_carlist/%d.neonmods",vehicleid);
if(dini_Exists(formatLD))
{
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
else
{
dini_Create(formatLD);
dini_IntSet(formatLD,"mod1",TuneCar[vehicleid][mod1]);
dini_IntSet(formatLD,"mod2",TuneCar[vehicleid][mod2]);
dini_IntSet(formatLD,"mod3",TuneCar[vehicleid][mod3]);
dini_IntSet(formatLD,"mod4",TuneCar[vehicleid][mod4]);
dini_IntSet(formatLD,"mod5",TuneCar[vehicleid][mod5]);
dini_IntSet(formatLD,"mod6",TuneCar[vehicleid][mod6]);
dini_IntSet(formatLD,"mod7",TuneCar[vehicleid][mod8]);
dini_IntSet(formatLD,"mod9",TuneCar[vehicleid][mod9]);
dini_IntSet(formatLD,"mod10",TuneCar[vehicleid][mod10]);
dini_IntSet(formatLD,"mod11",TuneCar[vehicleid][mod11]);
}
return 0;
}
public OnVehicleRespray(playerid,vehicleid, color1, color2)
{
TuneCar[vehicleid][colorA] = color1;
TuneCar[vehicleid][colorB] = color2;
return 1;
}
Reply
#6

Nгo й vvarings e sim Warnings e tente consertar.
Reply
#7

lol nao tenho W, estraguei a tecla, e ja consegui arranjar, mas tipo eu meto neons e faзo /v estacionar, e depois dou respavvn aos carros e o neon fica la, mas quando desligo o servidor e volto a ligar os neons saiem pq ?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)