GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: Benceee - 2012. január 15. - 16:06:00

Cím: Kocsi rendszám, felülírás
Írta: Benceee - 2012. január 15. - 16:06:00
Sziasztok.
Ismét segítség kellene.
Adott egy kód:
 
if(PlayerInfo[playerid][kulcs] != 0)
            {
         if(PlayerInfo[playerid][penz] >= 3000)
         {
             new rnd = random(999);
             format(string,128,\"LLR-%d\",rnd);
             new asdd = PlayerInfo[playerid][kulcs];
             rendszam[asdd] = string;
             SCM(playerid, -1, \"Az autódon mostantól van rendszám.\");
         } else { SCM(playerid, -1, \"Nincs 3000$-od.\"); }
                } else { SCM(playerid, -1, \"Nincs kocsid.\"); }

 
Hiba:error 006: must be assigned to an array
Hibás sor:
 rendszam[asdd] = string;
Cím: Kocsi rendszám, felülírás
Írta: lackos888 - 2012. január 15. - 16:42:12
Hy!Én nekem is volt ilyen hibám, de így oldottam meg: [pawn]format(rendszam[asdd],sizeof(rendszam[asdd]),\"%s\",string);[/pawn]