MySQL BlueG - Get()Data - multi_threaded question
#8

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
That was the very first thing I did and have found it.

Spoke with my friend and we have a new workaround for my solution, but here's another problem.

pawn Код:
new object_data[5];
            object_data[0] = itemid;
            object_data[1] = INVALID_3DTEXT_ID;
            float(object_data[2]) = x;
            float(object_data[3]) = y;
            float(object_data[4]) = z;

            printf("Created: %d | Text: %d | X: %f | Y: %f | Z: %f", object_data[0], object_data[1], object_data[2], object_data[3], object_data[4]);
            Streamer_SetArrayData(STREAMER_TYPE_OBJECT, objectid, E_STREAMER_EXTRA_ID, object_data, sizeof(object_data));

float() = x ... etc. saving floats are spitting out the errors.
Код:
error 022: must be lvalue (non-constant)
warning 215: expression has no effect
x, y, z ARE the floats (OnPlayerEditDynamicObject default parameters).

Does anyone know how to get around that? I can't set "Float:" tag before "object_data[5]". Since it's gonna give me an error from Streamer_SetArrayData.

Thanks for help anyways.

edit://
Got the data finally.

object_data[2] = _;
....

Thanks (:
Without having to remove tags:
pawn Код:
// ** INCLUDES

#include <a_samp>
#include <streamer>

// ** MAIN

main()
{
    print("Loaded \"streamer_array_data.amx\".");
}

// ** CALLBACKS

public OnGameModeInit()
{
    new pickupid = CreateDynamicPickup(1242, 23, 136.6050, -74.2258, 1.4297);

    enum eData
    {
        value,
        Float:x
    };

    new aData[eData];

    aData[value] = 1;
    aData[x] = 10.0;

    Streamer_SetArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, aData);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerPickUpDynamicPickup(playerid, pickupid)
{
    new aData[2];
    Streamer_GetArrayData(STREAMER_TYPE_PICKUP, pickupid, E_STREAMER_EXTRA_ID, aData);

    printf("aData[0]: %d", aData[0]);
    printf("aData[1]: %f", aData[1]);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)