Variable getting a weird value
#1

For some reason, a variable I am using to store interior ID gets a weird value (not what it should get).
I have no idea what could cause that, I checked it hundred of times and it seems okay.

Code:

pawn Код:
// Enumerator in some part of the script.
enum E_INTERIOR_INFO
{
    interiorInterior,
    Float:interiorPosX,
    Float:interiorPosY,
    Float:interiorPosZ,
    Float:interiorRot,
    interiorName[128],
}
pawn Код:
// This array in another part of the script, I only show a small part of it, but it continues to about 100 lines.
new
    g_aInteriorInfo[][E_INTERIOR_INFO] =
    {
        { 11, 2003.1178, 1015.1948, 33.008, 351.5789, "Four Dragons' Managerial Suite" },
        { 5, 770.8033, -0.7033, 1000.7267, 22.8599, "Ganton Gym" }
                // ...
    };
pawn Код:
// The problematic code:
gHotelInfo[id][hotelExInterior] = g_aInteriorInfo[listitem][interiorInterior];
printf("%d, %d", gHotelInfo[id][hotelExInterior], g_aInteriorInfo[listitem][interiorInterior]);
I printed both variables (I chose the second interior) and this is the result:

Quote:

1084227584, 5

Any ideas?
Reply
#2

Something wrong with
gHotelInfo[id][hotelExInterior]

show me the enum of gHotelInfo
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)