[POMOC] - Errori

Započeo elemental., Oktobar 08, 2011, 21:21:30 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 4 gostiju pregledaju ovu temu.

Skripta koju koristim: NX
Detaljan opis problema: Prebacivao sam neke stvari iz XDRIVE GMa tj. prebacivao sam kreiranje organizacija IG. Prebacio sam komande i ostale stvari i izadju mi 4 errora:


gseg.pwn(314) : error 017: undefined symbol "OrgStats"
gseg.pwn(314) : error 036: empty statement
gseg.pwn(314) : error 017: undefined symbol "i"
gseg.pwn(314) : fatal error 107: too many error messages on one line


Evo linija 314:

for(new i = 1; i < sizeof(OrgStats); i++ )

Dio skripte: Evo sve sto sam prebacio. Stockovi:

stock MakeOrgFnc(playerid,Team, skin1, skin2,skin3,skin4,skin5,skin6, Ime[])
{
for(new i = 1; i < sizeof(OrgStats); i++ )
{
if(OrgStats[i][OrgSlot] == 0)
{
new string[128];
        new Float:TPos[4],Interior;
        GetPlayerPos(playerid, TPos[0],TPos[1],TPos[2]);
        GetPlayerFacingAngle(playerid,TPos[3]);
        Interior = GetPlayerInterior(playerid);
        OrgStats[i][OrgSlot] = 1;
        OrgStats[i][OrgSpawn][0] = TPos[0];
OrgStats[i][OrgSpawn][1] = TPos[1];
OrgStats[i][OrgSpawn][2] = TPos[2];
OrgStats[i][OrgSpawn][3] = TPos[3];
OrgStats[i][OrgInt] = Interior;

OrgStats[i][OrgSkin][0] = skin1;
OrgStats[i][OrgSkin][1] = skin2;
OrgStats[i][OrgSkin][2] = skin3;
OrgStats[i][OrgSkin][3] = skin4;
OrgStats[i][OrgSkin][4] = skin5;
OrgStats[i][OrgSkin][5] = skin6;

OrgStats[i][OrgTeam] = Team;

strmid(OrgStats[i][OrgIme], Ime, 0, strlen(Ime), 255);
if(OrgStats[i][OrgTeam] == 2)
{
format(string, sizeof(string), "[XDRIVE] Organizacija: Team: %d, skin1 %d, Skin6 %d ! Stvoreno!", OrgStats[i][OrgTeam], OrgStats[i][OrgSkin][0], OrgStats[i][OrgSkin][5]);
SCM(playerid, COLOR_LIGHTRED, string);
}
else
{
    format(string, sizeof(string), "[XDRIVE]: Banda/Mafija: Team: %d, skin1 %d, Skin6 %d ! Stvoreno!", OrgStats[i][OrgTeam], OrgStats[i][OrgSkin][0], OrgStats[i][OrgSkin][5]);
SCM(playerid, COLOR_LIGHTRED, string);
}
UpdateOrgInfo(i);
          break;
          }
}
return 0;
}
stock SetRankNameOrg(playerid, OrgID, Rank, Ime[])
{
if(OrgStats[OrgID][OrgSlot] == 1)
{
if(Rank == 1)
{
strmid(OrgStats[OrgID][OrgRank1], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 1!");
}
else if(Rank == 2)
{
strmid(OrgStats[OrgID][OrgRank2], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 2!");
}
else if(Rank == 3)
{
strmid(OrgStats[OrgID][OrgRank3], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 3!");
}
else if(Rank == 4)
{
strmid(OrgStats[OrgID][OrgRank4], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 4!");
}
else if(Rank == 5)
{
strmid(OrgStats[OrgID][OrgRank5], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 5!");
}
else if(Rank == 6)
{
strmid(OrgStats[OrgID][OrgRank6], Ime, 0, strlen(Ime), 255);
SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Uspjesno namjesten rank 6!");
}
else
    {SCM(playerid,COLOR_LIGHTRED, "[XDRIVE]: Nemoguce postavit zadani rank");}
UpdateOrgInfo(OrgID);
}
return 0;
}

stock SetOrgSpawnPos(playerid,Org)
{
if(OrgStats[Org][OrgSlot] == 1)
{
    new Float:TPos[4],Interior;
      GetPlayerPos(playerid, TPos[0],TPos[1],TPos[2]);
      GetPlayerFacingAngle(playerid,TPos[3]);
        Interior = GetPlayerInterior(playerid);
        OrgStats[Org][OrgSpawn][0] = TPos[0];
OrgStats[Org][OrgSpawn][1] = TPos[1];
OrgStats[Org][OrgSpawn][2] = TPos[2];
OrgStats[Org][OrgSpawn][3] = TPos[3];
OrgStats[Org][OrgInt] = Interior;
SCM(playerid, COLOR_LIGHTGREEN,"Postavili ste trenutno mjesto spawna organizacija!");
UpdateOrgInfo(Org);
}
return 0;
}

stock SetOrgSefPos(playerid,Org)
{
if(OrgStats[Org][OrgSlot] == 1)
{
    new Float:TPos[3];
      GetPlayerPos(playerid, TPos[0],TPos[1],TPos[2]);
        OrgStats[Org][OrgSefPos][0] = TPos[0];
OrgStats[Org][OrgSefPos][1] = TPos[1];
OrgStats[Org][OrgSefPos][2] = TPos[2];
SCM(playerid, COLOR_LIGHTGREEN,"Postavili ste trenutno mjesto sefa!");
UpdateOrgInfo(Org);
}
return 0;
}





Komande:

CMD:makefaction(playerid,params[])
{
    if(GetPVarInt(playerid,"Logiran") == 1 && GetPVarInt(playerid,"AdminLvl") > 1337)
{
new team,skin1,skin2,skin3,skin4,skin5,skin6,ime[32];
if (sscanf(params, "ddddddds[32]", team,skin1,skin2,skin3,skin4,skin5,skin6,ime)) SCM(playerid, COLOR_WHITE, "Koristenje: /makefaction team,skin1,skin2,skin3,skin4,skin5,skin6,ime");
else if(skin1 == 0) SCM(playerid, COLOR_WHITE, "Koristenje: /makefaction team,skin1,skin2,skin3,skin4,skin5,skin6,ime");
else
{
    MakeOrgFnc(playerid,team, skin1, skin2,skin3,skin4,skin5,skin6, ime);
}
}
return 1;
}
CMD:setrankname(playerid,params[])
{
    if(GetPVarInt(playerid,"Logiran") == 1 && GetPVarInt(playerid,"AdminLvl") > 1337)
{
new org,rank,ime[32];
if (sscanf(params, "dds[32]", org,rank,ime)) SCM(playerid, COLOR_WHITE, "Koristenje: /setrankname org rank ime");
else if(rank == 0) SCM(playerid, COLOR_WHITE, "Koristenje: /setrankname org rank ime");
else
{
    SetRankNameOrg(playerid, org,rank, ime);
}
}
return 1;
}

CMD:setorgspawnpos(playerid,params[])
{
    if(GetPVarInt(playerid,"Logiran") == 1 && GetPVarInt(playerid,"AdminLvl") > 1337)
{
new org;
if (sscanf(params, "d", org)) SCM(playerid, COLOR_WHITE, "Koristenje: /setorgspawnpos [ORG ID]");
else if(org == 0) SCM(playerid, COLOR_WHITE, "Koristenje: /setorgspawnpos [ORG ID]");
else
{
    SetOrgSpawnPos(playerid, org);
}
}
return 1;
}

CMD:setorgsefpos(playerid,params[])
{
    if(GetPVarInt(playerid,"Logiran") == 1 && GetPVarInt(playerid,"AdminLvl") > 1337)
{
new org;
if (sscanf(params, "d", org)) SCM(playerid, COLOR_WHITE, "Koristenje: /setorgsefpos [ORG ID]");
else if(org == 0) SCM(playerid, COLOR_WHITE, "Koristenje: /setorgsefpos [ORG ID]");
else
{
    SetOrgSefPos(playerid, org);
}
}
return 1;
}

dragan12

Kolko vidim fali ti enum
Potrazi new OrgStats
I prebaci i enum i to ili napravi enum po tome sto imas ali ako si prebacivao od nekud onda prebaci i taj enum

Citat: [BD]Gagi poslato Oktobar 08, 2011, 21:27:07 POSLE PODNE
Kolko vidim fali ti enum
Potrazi new OrgStats
I prebaci i enum i to ili napravi enum po tome sto imas ali ako si prebacivao od nekud onda prebaci i taj enum

Prebacio, nece.

dragan12

Citat: [URP & BM] Lozim se na ¤ SpaMastera ¤ poslato Oktobar 08, 2011, 21:35:34 POSLE PODNE
Citat: [BD]Gagi poslato Oktobar 08, 2011, 21:27:07 POSLE PODNE
Kolko vidim fali ti enum
Potrazi new OrgStats
I prebaci i enum i to ili napravi enum po tome sto imas ali ako si prebacivao od nekud onda prebaci i taj enum

Prebacio, nece.
Sta si prebacio daj da vidim.

Citat: [BD]Gagi poslato Oktobar 08, 2011, 21:50:22 POSLE PODNE

EDIT: Dobio sam novi error, dodavao sam radare:

G_ObjectsRot.inc(91) : error 004: function "OnObjectRotated" is not implemented
Dodaj na kraj moda ovo:
public OnObjectRotated(objectid)
{
   return 1;
}
public OnObjectStopRotate(objectid)
{
   return 1;
}
public OnObjectStopBucle(objectid)
{
   return 1;
}

Ovo si preskocio:
Citat2. Add in end of your script:
pawn Code:

public OnObjectRotated(objectid)
{
   return 1;
}
public OnObjectStopRotate(objectid)
{
   return 1;
}
public OnObjectStopBucle(objectid)
{
   return 1;
}
Poslednja Izmena: Oktobar 09, 2011, 08:36:58 PRE PODNE od [BD]Gagi