Tanke einfügen, aber wie?

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo liebe Scripter...
    Ich suche einen Weg eine Tanke einzufügen.
    Ich kann kein /fill machen, ich denke dies liegt daran das es keine Tank gibt, in der "fuelstations.cfg".


    Public, der die Tanke lädt.


    public LoadTanke()
    {
    new arrCoords[16][64];
    new strFromFile2[256];
    new File: file = fopen("fuelstations.cfg", io_read);
    if (file)
    {
    new idx;
    while (idx < sizeof(TankeInfo))
    {
    fread(file, strFromFile2);
    split(strFromFile2, arrCoords, '|');
    TankeInfo[idx][tOwned] = strval(arrCoords[0]);
    strmid(TankeInfo[idx][tOwner], arrCoords[1], 0, strlen(arrCoords[1]), 255);
    strmid(TankeInfo[idx][tMessage], arrCoords[2], 0, strlen(arrCoords[2]), 255);
    strmid(TankeInfo[idx][tExtortion], arrCoords[3], 0, strlen(arrCoords[3]), 255);
    TankeInfo[idx][tEntranceX] = floatstr(arrCoords[4]);
    TankeInfo[idx][tEntranceY] = floatstr(arrCoords[5]);
    TankeInfo[idx][tEntranceZ] = floatstr(arrCoords[6]);
    TankeInfo[idx][tLevelNeeded] = strval(arrCoords[7]);
    TankeInfo[idx][tBuyPrice] = strval(arrCoords[8]);
    TankeInfo[idx][tEntranceCost] = strval(arrCoords[9]);
    TankeInfo[idx][tTill] = strval(arrCoords[10]);
    TankeInfo[idx][tLocked] = strval(arrCoords[11]);
    TankeInfo[idx][tInterior] = strval(arrCoords[12]);
    TankeInfo[idx][tProducts] = strval(arrCoords[13]);
    TankeInfo[idx][tMaxProducts] = strval(arrCoords[14]);
    TankeInfo[idx][tPriceProd] = strval(arrCoords[15]);
    idx++;
    }
    fclose(file);
    }
    return 1;
    }


    Wie es in der "fuelstations.cfg" aussieht:


    0|The State||No-one|0.000000|0.000000|0.000000|0|0|0|0|1|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0
    0||||0.000000|0.000000|0.000000|0|0|0|0|0|0|0|0|0


    Kann mir einer Helfen?