help with 4 errors
#1

Hello guys ,

today am having 4 errors , being crazy to fix them but no resutl , i really need your help guys , Look , whene i try to compile this is the error

PHP код:
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17619) : warning 217loose indentation
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17619) : error 017undefined symbol "GangFile"
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17619) : warning 202number of arguments does not match definition
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17619) : error 001expected token","but found ";"
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17614) : error 010invalid function or declaration
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(17614 -- 17621) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
4 Errors

and here is all the lines number 17619 and 17614 and 17621 ...




PHP код:
public OnGameModeInit()         // this is the line number 17593
{
    print(
"Gamemode started.");
    
// Default Rates
    
print("Gamemode started.");
    new 
a[][] =
    {
        
"Unarmed (Fist)",
        
"Brass K"
    
};
    
#pragma unused a
    
print("Gamemode started.");
    
tollstatus 0;
    
tollopen 0;
    
//InitDatabase();
    //Audio_SetPack("default_pack", true);
    
djson_GameModeInit();
    
EnableStuntBonusForAll(0);
    new 
servergmtextstr[128];
    
format(servergmtextstr128"gamemodetext %s"SERVER_GM_TEXT);
    
SendRconCommand(servergmtextstr); // DO NOT REMOVE THIS
    
new string[42];     // This is the line number 17614 
    
new string1[MAX_PLAYER_NAME];
    
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
    
DisableInteriorEnterExits();
    
InitTurfWars();
 
LoadTurfWars(fclose(GangFile);   // this is the line number 17619
    
}
    return 
1;
// this is the line number 17622 
Reply
#2

error 017: undefined symbol "GangFile"

#define GangFile

use tab 17619

Delete
new string[42];
Reply
#3

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
error 017: undefined symbol "GangFile"

#define GangFile

use tab 17619

Delete
new string[42];
Here is the new edit of the lines you told me to do

PHP код:
public OnGameModeInit()
{
    print(
"Gamemode started.");
    
// Default Rates
    
print("Gamemode started.");
    new 
a[][] =
    {
        
"Unarmed (Fist)",
        
"Brass K"
    
};
    
#pragma unused a
    
print("Gamemode started.");
    
tollstatus 0;
    
tollopen 0;
    
//InitDatabase();
    //Audio_SetPack("default_pack", true);
    
djson_GameModeInit();
    
EnableStuntBonusForAll(0);
    new 
servergmtextstr[128];
    
format(servergmtextstr128"gamemodetext %s"SERVER_GM_TEXT);
    
SendRconCommand(servergmtextstr); // DO NOT REMOVE THIS
    
new string1[MAX_PLAYER_NAME];
    
ShowPlayerMarkers(PLAYER_MARKERS_MODE_STREAMED);
    
DisableInteriorEnterExits();
    
InitTurfWars();
     
LoadTurfWars(fclose(GangFile);
    }
    return 
1;

But !!! whene i did what you said , i deleted the string and i used tab to move the line etc .. but am not sure if i've puted the define correctly
because whene im just putting the define with other difines he gives me another 6 errors


whom are :

PHP код:
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16566) : error 001expected token"-identifier-"but found "="
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16568) : error 029invalid expressionassumed zero
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : error 029invalid expressionassumed zero
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : warning 215expression has no effect
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : warning 215expression has no effect
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : error 001expected token";"but found ")"
C:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : error 029invalid expressionassumed zero
C
:\Documents and Settings\admin\Bureau\project-la\gamemodes\P-LA.pwn(16574) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors

The lines are



PHP код:
LoadFamiliesHQ()
{
    new 
string2[64];
    
format(string2sizeof(string2), "familieshq.ini");
    new 
FileGangFile fopen(string2io_read);   // here is the line 16566
    //printf("[DEBUG] LoadFamiliesHQ: string2 (%s)", string2);
    
if ( GangFile )  // here is the line 16568
    
{
        
//print("[DEBUG] LoadFamiliesHQ: GangFile exists, the handle parsed.");
        
new key256 ] , val256 ];
        new 
Data256 ];
        
//print("[DEBUG] Starting while ( fread( GangFile , Data , sizeof( Data ) ) )");
        
while ( freadGangFile Data sizeofData ) ) ) // here is the line 16574
        
{
            new 
string[128];
            for(new 
0MAX_FAMILYf++)
            {
                
key ini_GetKeyData );
                
format(string128"Family%dEntranceX",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyEntrance][0] = floatstrval ); }
                
format(string128"Family%dEntranceY",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyEntrance][1] = floatstrval ); }
                
format(string128"Family%dEntranceZ",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyEntrance][2] = floatstrval ); }
                
format(string128"Family%dEntranceA",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyEntrance][3] = floatstrval ); }
                
format(string128"Family%dExitX",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyExit][0] = floatstrval ); }
                
format(string128"Family%dExitY",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyExit][1] = floatstrval ); }
                
format(string128"Family%dExitZ",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyExit][2] = floatstrval ); }
                
format(string128"Family%dExitA",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyExit][3] = floatstrval ); }
                
format(string128"Family%dInterior",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyInterior] = strvalval ); }
                
format(string128"Family%dCustomMap",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyCustomMap] = strvalval ); }
                
format(string128"Family%dVirtualWorld",f);
                if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyInfo[f][FamilyVirtualWorld] = strvalval ); }
                for(new 
fv 0fv MAX_GANG_VEHICLESfv++)
                {
                    
format(string128"Family%dVeh%dModelId",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvModelId] = strvalval ); }
                    
format(string128"Family%dVeh%dSpawnx",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvSpawnx] = floatstrval ); }
                    
format(string128"Family%dVeh%dSpawny",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvSpawny] = floatstrval ); }
                    
format(string128"Family%dVeh%dSpawnz",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvSpawnz] = floatstrval ); }
                    
format(string128"Family%dVeh%dSpawna",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvSpawna] = floatstrval ); }
                    
format(string128"Family%dVeh%dLock",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvLock] = strvalval ); }
                    
format(string128"Family%dVeh%dLocked",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvLocked] = strvalval ); }
                    
format(string128"Family%dVeh%dPaintJob",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvPaintJob] = strvalval ); }
                    
format(string128"Family%dVeh%dColor1",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvColor1] = strvalval ); }
                    
format(string128"Family%dVeh%dColor2",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvColor2] = strvalval ); }
                    
format(string128"Family%dVeh%dFuel",ffv);
                    if( 
strcmpkey string true ) == ) { val ini_GetValueData ); FamilyVehicleInfo[f][fv][fvFuel] = floatstrval ); }
                }
                
//printf("Family %d loaded [DEBUG] FamilyEntranceX: %.1f FamilyEntranceY: %.1f FamilyEntranceZ: %.1f", f, FamilyInfo[f][FamilyEntrance][0], FamilyInfo[f][FamilyEntrance][1], FamilyInfo[f][FamilyEntrance][2]);
            
}
        }
        
fclose(GangFile);
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
error 017: undefined symbol "GangFile"

#define GangFile

use tab 17619

Delete
new string[42];
That's incorrect. That's not how #define works.

You define two symbols:
pawn Код:
#define A B
But that's not the point of this thread.

GangFile would be used for opening a file.

pawn Код:
new
    File: GangFile = fopen( "file_here", io_type_here )
;
if( GangFile )
{
    // do some stuff here (read/write)
    fclose( GangFile );
}
I don't know what you're trying to do.
Reply
#5

Now , can you please tell me how i will fix thoes 4 errors ?
Reply
#6

Please i need Help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)