Dinamic System pomoc

Započeo Skorpija_026, Septembar 23, 2018, 15:44:44 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Problem(error/warning): Nema Error
Dio skripte: [ pawn ]Svoj Skill Arena v2.4 edit[ /pawn ]
Debug iz server_log(ukoliko je u pitanju crashanje servera - crashdetect log): [pawn][15:41:41] [debug]  Attempted to read/write array element at index 65535 in array of size 1500
[15:41:41] [debug] AMX backtrace:
[15:41:41] [debug] #0 002e24b8 in public @_yCarmory (playerid=0, params[]=@01c7346c "create stan 3 1 1", help=0) at C:\Users\s\Desktop\Project Xiaomi\gamemodes\Xiaomi.pwn:21381
[15:41:41] [debug] #1 002e203c in public @yC_armory (a=0, b[]=@01c7346c "create stan 3 1 1", c=0, i=0) at C:\Users\s\Desktop\Project Xiaomi\gamemodes\Xiaomi.pwn:21368
[15:41:41] [debug] #2 native CallRemoteFunction () from samp-server.exe
[15:41:41] [debug] #3 000463b0 in Command_Process (playerid=0, cmdtext[]=@01c73404 "/armory", help=0) at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_commands.inc:2499
[15:41:41] [debug] #4 00045a90 in ?? (... <2 arguments>) at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_commands.inc:2297
[15:41:41] [debug] #5 0002d35c in main (playerid=0, cmdtext[]=@01c73404 "/armory") at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_hooks/impl.inc:946
[15:41:48] sscanf warning: String buffer overflow.
[15:41:48] [debug] Run time error 4: "Array index out of bounds"
[15:41:48] [debug]  Attempted to read/write array element at index 65535 in array of size 1500
[15:41:48] [debug] AMX backtrace:
[15:41:48] [debug] #0 002e24b8 in public @_yCarmory (playerid=0, params[]=@01c7346c "create stan 3 1 1", help=0) at C:\Users\s\Desktop\Project Xiaomi\gamemodes\Xiaomi.pwn:21381
[15:41:48] [debug] #1 002e203c in public @yC_armory (a=0, b[]=@01c7346c "create stan 3 1 1", c=0, i=0) at C:\Users\s\Desktop\Project Xiaomi\gamemodes\Xiaomi.pwn:21368
[15:41:48] [debug] #2 native CallRemoteFunction () from samp-server.exe
[15:41:48] [debug] #3 000463b0 in Command_Process (playerid=0, cmdtext[]=@01c73404 "/armory", help=0) at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_commands.inc:2499
[15:41:48] [debug] #4 00045a90 in ?? (... <2 arguments>) at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_commands.inc:2297
[15:41:48] [debug] #5 0002d35c in main (playerid=0, cmdtext[]=@01c73404 "/armory") at C:\Users\s\Desktop\Project Xiaomi\pawno\include\YSI\y_hooks/impl.inc:946
[15:41:49] [part] Skorpija has left the server (0:1)
i[/pawn]
Slika/video ingame problema(obavezno ako je ingame problem): ne potrebno
Oprazlozenje: Napravio sam komandu preko koje mogu da kreiram kucu ,stan, firmu itd za sad sam napravio samo za stan da bi testo dali radi kucam /armory create stan i posle id level i novac i nece dradi pravi problem debugova
Kod: [pawn]YCMD:armory(playerid, params[],help)
{
    #pragma unused help
   new akcija[12];
   if(sscanf(params, "s[12]", akcija)) return SendUsageMessage(playerid, "/armory (create/edit/delete/goto/id)");
   if(PlayerInfo[playerid][pAdmin] < 6) return SendErrorMessage( playerid, "Samo Vlasnik");
   if(strfind(akcija, "create", true) != -1)
   {
       if(strfind(akcija, "Stan", true) != -1)
      {
         new idstan,level,cena,sstan[80]; GetPlayerPos(playerid,X,Y,Z);
         if(sscanf(params, "s[12]uii",akcija,idstan,level,cena)) return SendUsageMessage( playerid, "/armory create [ID] [Level] [Cena]");
         if(fexist(sstan)) return SCM(playerid,-1, "[Xiaomi] | "SPLAVA"ID tog stana vec postoji!");
         StanInfo[idstan][sIzlazX] = 244.1522; StanInfo[idstan][sIzlazY] = 305.0730; StanInfo[idstan][sIzlazZ] = 999.1484; StanInfo[idstan][sInt] = 1;
         StanInfo[idstan][sCena] = cena; StanInfo[idstan][sLevel] = level; StanInfo[idstan][sUlazX] = X;
         StanInfo[idstan][sUlazY] = Y; StanInfo[idstan][sUlazZ] = Z; StanInfo[idstan][sProveraVlasnika] = 0;
            StanInfo[idstan][sNovac] = 0; StanInfo[idstan][sZatvoreno] = 1; StanInfo[idstan][sVW] = idstan;
          StanInfo[idstan][sOruzije] = -1; StanInfo[idstan][sMunicija] = 0;
          strmid(StanInfo[idstan][sVlasnik],"Niko",0,strlen("Niko"),255);
       }
       else
       {
          new idstan, string[500];
         format(string,sizeof(string),""ZUTA"[ STAN NA PRODAJU ]!\nCena: "BELA"%d$\n"ZUTA"Level: "BELA"%d\n"ZUTA"Za kupovinu /kupistan",StanInfo[idstan][sCena], StanInfo[idstan][sLevel]);
         StanLabel[idstan] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ],25,0,1);
         StanPickup[idstan] = CreateDynamicPickup(19134, 1, StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ]);
         va_SendClientMessage(playerid,-1,""CRVENA"[Xiaomi] "SIVA"Stan je uspesno kreiran (ID Stana: %d)!",idstan);
         SacuvajStan(idstan);
       }
   }
   return 1;
}[/pawn]
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Zbunio si ga druze  8)
[pawn]YCMD:armory(playerid, params[],help)
{
    #pragma unused help
   new akcija[12],reakcija[12];
   if(sscanf(params, "s[12]s[12]", akcija, reakcija)) return SendUsageMessage(playerid, "/armory (create/edit/delete/goto/id)");
   if(PlayerInfo[playerid][pAdmin] < 6) return SendErrorMessage( playerid, "Samo Vlasnik");
   if(strfind(akcija, "create", true) != -1)
   {
       if(strfind(reakcija, "Stan", true) != -1)
      {
         new idstan,level,cena,sstan[80]; GetPlayerPos(playerid,X,Y,Z);
         if(sscanf(params, "ii",level,cena)) return SendUsageMessage( playerid, "/armory create stan [Level] [Cena]");
             for(new idstan = 0; idstan < sizeof(StanInfo); idstan++)
          {
            new sstan[64];
             format(sstan, sizeof(sstan), "Stanovi/Stan_%d.ini", i);//promjeni sebi kako ti je vec napravljeno spremanje
             if(!fexist(sstan))
             {
               StanInfo[idstan][sIzlazX] = X; StanInfo[idstan][sIzlazY] = Y; StanInfo[idstan][sIzlazZ] = Z; StanInfo[idstan][sInt] = GetPlayerInterior(playerid);
               StanInfo[idstan][sCena] = cena; StanInfo[idstan][sLevel] = level; StanInfo[idstan][sUlazX] = X;
               StanInfo[idstan][sUlazY] = Y; StanInfo[idstan][sUlazZ] = Z; StanInfo[idstan][sProveraVlasnika] = 0;
                  StanInfo[idstan][sNovac] = 0; StanInfo[idstan][sZatvoreno] = 1; StanInfo[idstan][sVW] = idstan;
                StanInfo[idstan][sOruzije] = -1; StanInfo[idstan][sMunicija] = 0;
                strmid(StanInfo[idstan][sVlasnik],"Niko",0,strlen("Niko"),255);
                format(string,sizeof(string),""ZUTA"[ STAN NA PRODAJU ]!\nCena: "BELA"%d$\n"ZUTA"Level: "BELA"%d\n"ZUTA"Za kupovinu /kupistan",StanInfo[idstan][sCena], StanInfo[idstan][sLevel]);
               StanLabel[idstan] = CreateDynamic3DTextLabel(string ,0x33CCFFAA,StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ],25,0,1);
               StanPickup[idstan] = CreateDynamicPickup(19134, 1, StanInfo[idstan][sUlazX], StanInfo[idstan][sUlazY], StanInfo[idstan][sUlazZ]);
               va_SendClientMessage(playerid,-1,""CRVENA"[Xiaomi] "SIVA"Stan je uspesno kreiran (ID Stana: %d)!",idstan);
                SacuvajStan(idstan);
            }
         }
      }
      /*if(strfind(reakcija, "Kuca", true) != -1)
      {
      }*/
      else return SendClientMessage(playerid,-1,""CRVENA"[Xiaomi] "SIVA"Birali ste nevazecu akciju! "CRVENA"[Dostupne akcije {ffffff}-Stan-]");
   }
   /*   if(strfind(akcija, "edit", true) != -1)
   {
   }*/
   else return SendClientMessage(playerid,-1,""CRVENA"[Xiaomi] "SIVA"Birali ste nevazecu akciju! "CRVENA"[Dostupne akcije {ffffff}-Create-]");
   return 1;
}[/pawn]

sad nema debugova ,ali nece da kreira
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

neko pomoc hitno
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]

Citat: Skorpija poslato Septembar 24, 2018, 00:34:13 PRE PODNE
sad nema debugova ,ali nece da kreira
Fali ti druze ostatak skripte il nije uredu.
aj dodaj funkciju sacuvajstan def stanLabel i pickup

Citat: Mido Karic poslato Septembar 24, 2018, 14:54:27 POSLE PODNE
Fali ti druze ostatak skripte il nije uredu.
aj dodaj funkciju sacuvajstan def stanLabel i pickup

Ima sve to
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]


nzm zna neko resenje?
Vandals Project OGC
[size=11.25pt]Vandals Project OGC[/size][/font]
[/color]