Errors +Rep
#1

I fixed these errors please see next post..

Updated enum:

pawn Код:
enum ToySystem
{
    tCreated,
    tEquipped,
    tName[128], // LINE 1049
    tIndexID,
    tModelID,
    tBoneID,
    Float: tOffsetX,
    Float: tOffsetY,
    Float: tOffsetZ,
    Float: tRotX,
    Float: tRotY,
    Float: tRotZ,
    Float: tScaleX,
    Float: tScaleY,
    Float: tScaleZ
}
new ToyInfo[MAX_PLAYERS][ToySystem][MAX_TOYS];
Reply
#2

I managed to fix some of the errors above. But now I have some tag issues.

Here are the errors:

pawn Код:
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5125) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5126) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5127) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5128) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5129) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5130) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5131) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5132) : warning 213: tag mismatch
C:\Users\User\Documents\SAMP Stuff\GTA-SH Server 0.3z\gamemodes\GTASH_ToysEdit.pwn(5133) : warning 213: tag mismatch
Here are the lines of code:

pawn Код:
forward LoadToys(playerid);
public LoadToys(playerid)
{
    new stringtoy[128];
    for(new x = 0; x < MAX_TOYS; x++)
    {
        format(stringtoy, sizeof(stringtoy), "South-WestRP/PlayerToys/%s.ini", GetPlayerNameEx(playerid));
        new File:example = fopen(stringtoy, io_read);
        if(example)
        {
            new key[ 256 ] , val[ 256 ];
            new Data[ 256 ];
            while ( fread( example , Data , sizeof( Data ) ) )
            {
                key = ini_GetKey( Data );
                if( strcmp( key , "tCreated[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tCreated][x] = strval( val ); }
                if( strcmp( key , "tEquipped[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tEquipped][x] = strval( val ); }
                if( strcmp( key , "tName[x]" , true ) == 0 ) { val = ini_GetValue( Data ); strmid(ToyInfo[playerid][tName][x], val, 0, strlen(val)-1, 128); }
                if( strcmp( key , "tIndexID[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tIndexID][x] = strval( val ); }
                if( strcmp( key , "tModelID[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tModelID][x] = strval( val ); }
                if( strcmp( key , "tBoneID[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tBoneID][x] = strval( val ); }
                if( strcmp( key , "tOffsetX[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tOffsetX][x] = floatstr( val ); } // Line 5125
                if( strcmp( key , "tOffsetY[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tOffsetY][x] = floatstr( val ); }
                if( strcmp( key , "tOffsetZ[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tOffsetZ][x] = floatstr( val ); }
                if( strcmp( key , "tRotX[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tRotX][x] = floatstr( val ); }
                if( strcmp( key , "tRotY[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tRotY][x] = floatstr( val ); }
                if( strcmp( key , "tRotZ[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tRotZ][x] = floatstr( val ); }
                if( strcmp( key , "tScaleX[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tScaleX][x] = floatstr( val ); }
                if( strcmp( key , "tScaleY[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tScaleY][x] = floatstr( val ); }
                if( strcmp( key , "tScaleZ[x]" , true ) == 0 ) { val = ini_GetValue( Data ); ToyInfo[playerid][tScaleZ][x] = floatstr( val ); } // Line 5133
            }
            fclose(example);
        }
    }
    return 1;
}
Reply
#3

Ok I've checked everything possible and I can't find where I've gone wrong. If any one has any ideas on why I'm getting the tag mismatch that would be excellent! I will +Rep for any help!
Reply
#4

Check, if the variables are declared with a "Float:"
What i mean is, i think you have something like a enum, so:
pawn Код:
enum BlaBla
{
     Float:tOffsetX,
     Float:tOffsetY,
     //....
}
Edit: Oh, just saw that you already have the Float before the float variables.. sorry
Reply
#5

Quote:
Originally Posted by Macronix
Посмотреть сообщение
Check, if the variables are declared with a "Float:"
What i mean is, i think you have something like a enum, so:
pawn Код:
enum BlaBla
{
     Float:tOffsetX,
     Float:tOffsetY,
     //....
}
Edit: Oh, just saw that you already have the Float before the float variables.. sorry
Yeah haha I'm sitting here scratching my head over this one.
Reply
#6

You cant have 4D array, i mean:
pawn Код:
ToyInfo[playerid][tName][..][toyid]; //that isnt possible, becase you are having playerid, name, and string, and toyid, you can only have 3.
i think this would solve your problem:
pawn Код:
enum ToySystem
{
    tCreated,
    tEquipped,
    tIndexID,
    tModelID,
    tBoneID,
    Float: tOffsetX,
    Float: tOffsetY,
    Float: tOffsetZ,
    Float: tRotX,
    Float: tRotY,
    Float: tRotZ,
    Float: tScaleX,
    Float: tScaleY,
    Float: tScaleZ
}
new ToyInfo[MAX_PLAYERS][ToySystem][MAX_TOYS];
new tName[MAX_PLAYERS][MAX_TOYS][128];
Reply
#7

Quote:
Originally Posted by [D]ry[D]esert
Посмотреть сообщение
You cant have 4D array, i mean:
pawn Код:
ToyInfo[playerid][tName][..][toyid]; //that isnt possible, becase you are having playerid, name, and string, and toyid, you can only have 3.
i think this would solve your problem:
pawn Код:
enum ToySystem
{
    tCreated,
    tEquipped,
    tIndexID,
    tModelID,
    tBoneID,
    Float: tOffsetX,
    Float: tOffsetY,
    Float: tOffsetZ,
    Float: tRotX,
    Float: tRotY,
    Float: tRotZ,
    Float: tScaleX,
    Float: tScaleY,
    Float: tScaleZ
}
new ToyInfo[MAX_PLAYERS][ToySystem][MAX_TOYS];
new tName[MAX_PLAYERS][MAX_TOYS][128];
Hello I already fixed these problems please see here my new thread thankyou.. https://sampforum.blast.hk/showthread.php?tid=500009
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)