warning 229: index tag mismatch -
C00K13M0N$73R - 25.10.2012
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.
Re: warning 229: index tag mismatch -
HyDrAtIc - 25.10.2012
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.
Re: warning 229: index tag mismatch -
C00K13M0N$73R - 25.10.2012
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}
};
Re: warning 229: index tag mismatch -
HyDrAtIc - 25.10.2012
Show errors?
Re: warning 229: index tag mismatch -
C00K13M0N$73R - 25.10.2012
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.
Re: warning 229: index tag mismatch -
HyDrAtIc - 25.10.2012
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.
Re: warning 229: index tag mismatch -
C00K13M0N$73R - 25.10.2012
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.
Re: warning 229: index tag mismatch -
C00K13M0N$73R - 25.10.2012
Fixed
Sorry for double post.