warning 229: index tag mismatch
#1

Hello,

I get 3 warnings when trying to save a string to a variable.

Код:
(805) : warning 229: index tag mismatch (symbol "MisLocations")
(806) : warning 229: index tag mismatch (symbol "MisLocations")
(807) : warning 229: index tag mismatch (symbol "MisLocations")
Lines 805-807
PHP код:
Load[playerid] = MisLocations[MisRand][Loading];
FromLocation[playerid] = MisLocations[MisRand][From];
ToLocation[playerid] = MisLocations[MisRand][To]; 
My variables
PHP код:
new Load[MAX_PLAYERS][124];
new 
FromLocation[MAX_PLAYERS][124];
new 
ToLocation[MAX_PLAYERS][124]; 
My enum
PHP код:
enum MisLocationsEnum
{
    
IsTrailer,
    
Trailer,
    
Loading[124],
    
From[124],
    
To[124],
    
Float:LoadX,
    
Float:LoadY,
    
Float:LoadZ,
    
Float:UnloadX,
    
Float:UnloadY,
    
Float:UnloadZ,
    
Pay

Any help would be appreciated. Thanks.
Reply
#2

Maybe try to change the enum to:

PHP код:
enum MisLocations
{
    
IsTrailer,
    
Trailer,
    
Loading[124],
    
From[124],
    
To[124],
    
Float:LoadX,
    
Float:LoadY,
    
Float:LoadZ,
    
Float:UnloadX,
    
Float:UnloadY,
    
Float:UnloadZ,
    
Pay

And also know that the warnings have no effect at all,they just give you a warning of something you done,they don't do anything to script or when you launch server.
Reply
#3

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
Maybe try to change the enum to:

PHP код:
enum MisLocations
{
    
IsTrailer,
    
Trailer,
    
Loading[124],
    
From[124],
    
To[124],
    
Float:LoadX,
    
Float:LoadY,
    
Float:LoadZ,
    
Float:UnloadX,
    
Float:UnloadY,
    
Float:UnloadZ,
    
Pay

And also know that the warnings have no effect at all,they just give you a warning of something you done,they don't do anything to script or when you launch server.
I am aware of the difference between 'Warnings' and 'Errors'.

Anyway, that would give me errors as I have this.

PHP код:
new MisLocations[][MisLocationsEnum] =
{
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000}
}; 
Reply
#4

Show errors?
Reply
#5

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
Show errors?
error 021: symbol already defined: "MisLocations"

Changing the name, would just get me back into the same situation.
Reply
#6

Maybe did you try this?

PHP код:
new MisLocations[][MisLocations]
{
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000}
}; 
And diffrence between errors and warnings are:

Errors:Those effects on script and you can't execute the script without fixing them.

Warnings:Those doesn't effects on script and you don't really need to remove them and you can execute the script without fixing them.
Reply
#7

Quote:
Originally Posted by James_Nick
Посмотреть сообщение
Maybe did you try this?

PHP код:
new MisLocations[][MisLocations]
{
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000},
    {
0,415,"Fruit","Blueberry","Blueberry",0.3,0.3,0.3,0.3,0.3,0.3,5000}
}; 
And diffrence between errors and warnings are:

Errors:Those effects on script and you can't execute the script without fixing them.

Warnings:Those doesn't effects on script and you don't really need to remove them and you can execute the script without fixing them.
That's what I done......

I know the differences.
Reply
#8

Fixed

Sorry for double post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)