19 errors und irgendwie kenne ich mich nicht aus

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
  • So habe mir das script jez nochmal von der Festplatte genommen,so ist es original übernommen von 0.3a ohne das ich irgendwas verändert habe da kommt bei o.3c folgende errors

    [pwn]D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(522) : error 025: function heading differs from prototype
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(523) : error 021: symbol already defined: "strtok"
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(538) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(730) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(738) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2010) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2072) : warning 204: symbol is assigned a value that is never used: "zeitrechnen"
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2190) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2406) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2418) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2436) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2466) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2485) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2721) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2728) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2928) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2982) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2985) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2989) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2993) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(3026) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(3674) : error 047: array sizes do not match, or destination array is too small
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4271) : warning 219: local variable "mod" shadows a variable at a preceding level
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4399) : warning 219: local variable "mod" shadows a variable at a preceding level
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4487) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4999) : warning 235: public function lacks forward declaration (symbol "tutorial")
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    19 Errors.


    Das ist zeile 522-523
    strtok(const string[], &index, trenner = ' ')
    {
    new length = strlen(string);
    while ((index < length) && (string[index] <= trenner))
    {
    index++;
    }


    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > trenner) && ((index - offset) < (sizeof(result) - 1)))
    {
    result[index - offset] = string[index];
    index++;
    }
    result[index - offset] = EOS;
    return result;
    }


    Das ist zeile 538
    return result;
    das ist 2010
    cmd = strtok(cmdtext, idx);


    und die anderen errors haben auch alle mit dem cmd = strtok(cmdtext, idx); zu tun




    [/pwn]

  • haste das schon richtig Auf 3c Copyliert ? bzw alle Plugins geladen und so?

  • Ich weiß ja nicht, Was der Gm Für Sachen auf 3c alles brauch?
    Also du willst damit sagen das Du das einfach von dein 3a ordner auf 3c Gepackt hast ?

  • naja alle includes und den GM halt habe jetzt die array größe verändert von new cmd[128], idx, string[128];
    auf
    new cmd[256], idx, string[256];
    aber da stürzt mein home server wieder ab -.- bekomme dafür keine errors mehr

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Ja das ist es ja da steht nix drinnen )=


  • warnings sind diese hier..nix besonderes


    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(750) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(758) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(2094) : warning 204: symbol is assigned a value that is never used: "zeitrechnen"
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4293) : warning 219: local variable "mod" shadows a variable at a preceding level
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4421) : warning 219: local variable "mod" shadows a variable at a preceding level
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4509) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(5089) : warning 203: symbol is never used: "Typen"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    7 Warnings.


    scriptfiles sind alle da

  • nix besonderes lol,
    es muss immer alles ohne Error + Warning laufen!


    Ganz oben fügst du nun erstmal in den Script folgendes ein:



    #pragma tabsize 0


    Behebt folgende Fehler:



    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(750) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(758) : warning 217: loose indentation
    D:\PROGRA~1\ROCKST~1\GTASAN~1\GAMEMO~1\myrl.pwn(4509) : warning 217: loose indentation



    FÜr den Rest bitte die Zeilen, danke!


    Edit: // Ausgebessert

  • Zitat

    warning 204: symbol is assigned a value that is never used: "zeitrechnen"


    if (strcmp("/zahltag", cmdtext, true, 10) == 0)
    {
    new zeitrechnen = pSincePayday[playerid]-60; // das ist die errorzeile
    format(string, sizeof(string), "Zeit seit Payday: %d Spielzeit insgesamt:%d ",pSincePayday[playerid],pPlaytime[playerid] );
    SendClientMessage(playerid, 0xFFFFFFAA,string);// sendet Playerid in der Farbe Weiß String das ist das was wir eine ZEile obendrüber definiert haben.
    return 1;
    }


    Zitat

    warning 219: local variable "mod" shadows a variable at a preceding level


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new typ;
    typ=IsAutohausCar(vehicleid);
    if(typ!=-1)
    {
    new string[128];
    TogglePlayerControllable(playerid,0);
    Spectating[playerid][0]=typ;
    SetVehicleParamsForAll(vehicleid,0,1);
    SendClientMessage(playerid, COLOR_YELLOW, "~*~ Autohaus ~*~");
    format(string,128,"Name: %s",Kaufliste[typ][Name]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string,128,"Preis: $%i",Kaufliste[typ][Preis]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string,128,"Reparaturkosten: $%i",Kaufliste[typ][Reparatur]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    SendClientMessage(playerid, COLOR_GREEN, "Dieses Fahrzeug ist zu verkaufen. Um es zu kaufen, benutze: /Autokaufen");
    SendClientMessage(playerid, COLOR_GREEN, "Um das Fahrzeug zu verlassen, benutze: /exitcar");
    }
    }
    if(Spieler[playerid][aFuhrerschein] < 1 )
    RemovePlayerFromVehicle(playerid);
    if(newstate==PLAYER_STATE_DRIVER) {
    da[playerid]=true;
    new aid=GetPlayerVehicleID(playerid), mod; //Das ist die Errorzeile
    altauto[playerid]=aid;
    mod=GetVehicleModel(aid);
    altmod[playerid]=mod; }
    if(newstate == PLAYER_STATE_DRIVER && !DeActiveSpeedometer[playerid])
    {


    Zitat

    warning 219: local variable "mod" shadows a variable at a preceding level


    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    new mod=GetModType(componentid); //Das ist die error zeile
    switch (mod)
    {
    case 1: { Carlist[playerid][mod1]=componentid; }
    case 2: { Carlist[playerid][mod2]=componentid; }
    case 3: { Carlist[playerid][mod3]=componentid; }
    case 4: { Carlist[playerid][mod4]=componentid; }
    case 5: { Carlist[playerid][mod5]=componentid; }
    case 6: { Carlist[playerid][mod6]=componentid; }
    case 7: { Carlist[playerid][mod7]=componentid; }
    case 8: { Carlist[playerid][mod8]=componentid; }
    case 9: { Carlist[playerid][mod9]=componentid; }
    case 10: { Carlist[playerid][mod10]=componentid; }
    case 11: { Carlist[playerid][mod11]=componentid; }
    case 12: { Carlist[playerid][mod12]=componentid; }
    case 13: { Carlist[playerid][mod13]=componentid; }
    case 14: { Carlist[playerid][mod14]=componentid; }
    case 15: { Carlist[playerid][mod15]=componentid; }
    case 16: { Carlist[playerid][mod16]=componentid; }
    case 17: { Carlist[playerid][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    return 1;
    }


    So das waren alle


  • warning 219: local variable "mod" shadows a variable at a preceding level


    Behebung:



    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(newstate == PLAYER_STATE_DRIVER)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    new typ;
    typ=IsAutohausCar(vehicleid);
    if(typ!=-1)
    {
    new string[128];
    TogglePlayerControllable(playerid,0);
    Spectating[playerid][0]=typ;
    SetVehicleParamsForAll(vehicleid,0,1);
    SendClientMessage(playerid, COLOR_YELLOW, "~*~ Autohaus ~*~");
    format(string,128,"Name: %s",Kaufliste[typ][Name]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string,128,"Preis: $%i",Kaufliste[typ][Preis]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    format(string,128,"Reparaturkosten: $%i",Kaufliste[typ][Reparatur]);
    SendClientMessage(playerid, COLOR_YELLOW, string);
    SendClientMessage(playerid, COLOR_GREEN, "Dieses Fahrzeug ist zu verkaufen. Um es zu kaufen, benutze: /Autokaufen");
    SendClientMessage(playerid, COLOR_GREEN, "Um das Fahrzeug zu verlassen, benutze: /exitcar");
    }
    }
    if(Spieler[playerid][aFuhrerschein] < 1 )
    RemovePlayerFromVehicle(playerid);
    if(newstate==PLAYER_STATE_DRIVER) {
    da[playerid]=true;
    new aid=GetPlayerVehicleID(playerid), modbla; //Das ist die Errorzeile
    altauto[playerid]=aid;
    modbla=GetVehicleModel(aid);
    altmod[playerid]=modbla; }
    if(newstate == PLAYER_STATE_DRIVER && !DeActiveSpeedometer[playerid])
    {





    warning 219: local variable "mod" shadows a variable at a preceding level


    Behebung:



    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    new modxx=GetModType(componentid); //Das ist die error zeile
    switch (modxx)
    {
    case 1: { Carlist[playerid][modxx1]=componentid; }
    case 2: { Carlist[playerid][modxx2]=componentid; }
    case 3: { Carlist[playerid][modxx3]=componentid; }
    case 4: { Carlist[playerid][modxx4]=componentid; }
    case 5: { Carlist[playerid][modxx5]=componentid; }
    case 6: { Carlist[playerid][modxx6]=componentid; }
    case 7: { Carlist[playerid][modxx7]=componentid; }
    case 8: { Carlist[playerid][modxx8]=componentid; }
    case 9: { Carlist[playerid][modxx9]=componentid; }
    case 10: { Carlist[playerid][modxx10]=componentid; }
    case 11: { Carlist[playerid][modxx11]=componentid; }
    case 12: { Carlist[playerid][modxx12]=componentid; }
    case 13: { Carlist[playerid][modxx13]=componentid; }
    case 14: { Carlist[playerid][modxx14]=componentid; }
    case 15: { Carlist[playerid][modxx15]=componentid; }
    case 16: { Carlist[playerid][modxx16]=componentid; }
    case 17: { Carlist[playerid][modxx17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    return 1;
    }



    Der Befehl /zahltag wird nicht funzen da "zeitrechnen" nicht definiert ist.

  • Also erstmal danke für deine Hilfe :thumbup:
    aber jetzt besteht dieses Problem


    public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    new modxx=GetModType(componentid); //Das ist die error zeile
    switch (modxx)
    {
    case 1: { Carlist[playerid][modxx1]=componentid; }
    case 2: { Carlist[playerid][modxx2]=componentid; }
    case 3: { Carlist[playerid][modxx3]=componentid; }
    case 4: { Carlist[playerid][modxx4]=componentid; }
    case 5: { Carlist[playerid][modxx5]=componentid; }
    case 6: { Carlist[playerid][modxx6]=componentid; }
    case 7: { Carlist[playerid][modxx7]=componentid; }
    case 8: { Carlist[playerid][modxx8]=componentid; }
    case 9: { Carlist[playerid][modxx9]=componentid; }
    case 10: { Carlist[playerid][modxx10]=componentid; }
    case 11: { Carlist[playerid][modxx11]=componentid; }
    case 12: { Carlist[playerid][modxx12]=componentid; }
    case 13: { Carlist[playerid][modxx13]=componentid; }
    case 14: { Carlist[playerid][modxx14]=componentid; }
    case 15: { Carlist[playerid][modxx15]=componentid; }
    case 16: { Carlist[playerid][modxx16]=componentid; }
    case 17: { Carlist[playerid][modxx17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    return 1;
    }



    xD


  • public OnVehicleMod(playerid,vehicleid,componentid)
    {
    if (playerid!=GetPlayerFromCarlistCar(vehicleid)) {return 1;}
    if(playerid!=-1)
    {
    new modxx=GetModType(componentid); //Das ist die error zeile
    switch (mod)
    {
    case 1: { Carlist[playerid][mod1]=componentid; }
    case 2: { Carlist[playerid][mod2]=componentid; }
    case 3: { Carlist[playerid][mod3]=componentid; }
    case 4: { Carlist[playerid][mod4]=componentid; }
    case 5: { Carlist[playerid][mod5]=componentid; }
    case 6: { Carlist[playerid][mod6]=componentid; }
    case 7: { Carlist[playerid][mod7]=componentid; }
    case 8: { Carlist[playerid][mod8]=componentid; }
    case 9: { Carlist[playerid][mod9]=componentid; }
    case 10: { Carlist[playerid][mod10]=componentid; }
    case 11: { Carlist[playerid][mod11]=componentid; }
    case 12: { Carlist[playerid][mod12]=componentid; }
    case 13: { Carlist[playerid][mod13]=componentid; }
    case 14: { Carlist[playerid][mod14]=componentid; }
    case 15: { Carlist[playerid][mod15]=componentid; }
    case 16: { Carlist[playerid][mod16]=componentid; }
    case 17: { Carlist[playerid][mod17]=componentid; }
    default: { new string[128]; format(string,128,"Unbekannte Komponentenid: %i",componentid); print(string); }
    }
    }
    return 1;
    }


  • do.de - Domain-Offensive - Domains für alle und zu super Preisen