Error help

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
  • hey ich habe ein Error in diesem Code
    Der heißt so : error 030: compound statement not closed at the end of file (started at line 69346)


    public LoadCarInfo()
    {
    new val[256], key[256], Data[256];
    new File: hFile = fopen("LSPDCars.cfg", io_read);
    if( hFile)
    {
    while( fread( hFile, Data, sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key, "Carid", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cTyp] = strval( val );
    if(strcmp(key, "CarX", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cX] = floatstr( val ); // in der Zeile
    if(strcmp(key, "CarY", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cY] = floatstr( val );
    if(strcmp(key, "CarZ", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cZ] = floatstr( val );
    if(strcmp(key, "CarRot", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cRotation] = floatstr( val );
    }
    fclose( hFile );
    }
    return 1;
    }

  • habs jetz So gemacht un bekomme mehr Errors


    error 001: expected token: ";", but found "}"
    error 036: empty statement
    und das in jeder Zeile



    public LoadCarInfo()
    {
    new val[256], key[256], Data[256];
    new File: hFile = fopen("LSPDCars.cfg", io_read);
    if( hFile)
    {
    while( fread( hFile, Data, sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key, "Carid", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cTyp] = strval( val );
    if(strcmp(key, "CarX", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cX] = floatstr( val )}; // in der Zeile
    if(strcmp(key, "CarY", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cY] = floatstr( val )};
    if(strcmp(key, "CarZ", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cZ] = floatstr( val )};
    if(strcmp(key, "CarRot", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cRotation] = floatstr( val )};
    }
    fclose( hFile );
    }
    return 1;
    }

  • Immernoch die selben Errors in jeder Zeile insgesammt 10 2 in jeder Zeile



    /edit oke habs noch eine Frage


    public LoadCarInfo()
    {
    new val[256], key[256], Data[256];
    new File: hFile = fopen("LSPDCars.cfg", io_read);
    if( hFile)
    {
    while( fread( hFile, Data, sizeof( Data ) ) )
    {
    key = ini_GetKey(Data);
    if(strcmp(key, "Carid", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cTyp] = strval( val );}
    if(strcmp(key, "CarX", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cX] = floatstr( val );}
    if(strcmp(key, "CarY", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cY] = floatstr( val );}
    if(strcmp(key, "CarZ", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cZ] = floatstr( val );}
    if(strcmp(key, "CarRot", true) == 0) { val = ini_GetValue(Data); LSPDInfo[cRotation] = floatstr( val );}
    }
    fclose( hFile );
    }
    return 1; // was ist hier falsch eingerügt
    }