[Plugin] Streamer Plugin

I ******d the same issue on github (or ****** code, can't remember), it is the "normal" way the plugin operates.
Well the easiest workaround is to append data in reverse order, as:

new data[2];
data[0] = 1;
data[1] = 2;
Streamer_AppendArrayData(STREAMER_TYPE_OBJECT,obje ctid,E_STREAMER_EXTRA_ID,data[1]);
Streamer_AppendArrayData(STREAMER_TYPE_OBJECT,obje ctid,E_STREAMER_EXTRA_ID,data[0]);

Btw thanks for reply.
Reply

Nobody's know my problem?
Reply

You must use Streamer_AppendArrayData somewhere as it prints that the ID is invalid.
That happended to me when I manipulated with some objects, so when I looped through all objects and passed invalid ones to the funcion, that error showed. The solution for me was to first check if object vas valid.

You should find that funcion somewhere in your mode and debug the data that you pass to it.
Reply

Whenever I turn off the server, it occurs (2.7.1)
Код:
[26/04/2014 06:02:01] 

*** Streamer Plugin v2.7.1 by Incognito unloaded ***

[26/04/2014 06:02:01] [debug] Server crashed due to an unknown error
[26/04/2014 06:02:01] [debug] Native backtrace:
[26/04/2014 06:02:01] [debug] #0 004a409b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #1 0049f2d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #2 0049febc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #3 004a0366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #4 004a3cec in ?? () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #5 00678410 in ?? ()
[26/04/2014 06:02:01] [debug] #6 00678430 in ?? ()
[26/04/2014 06:02:01] [debug] #7 001fbb11 in gsignal () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #8 001fd3ea in abort () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #9 001f4e2b in ?? () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #10 001f4ee6 in ?? () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #11 00439806 in ?? () from plugins/streamer.so
[26/04/2014 06:02:01] [debug] #12 00437eb8 in ?? () from plugins/streamer.so
[26/04/2014 06:02:01] [debug] #13 00437f32 in ?? () from plugins/streamer.so
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
You must use Streamer_AppendArrayData somewhere as it prints that the ID is invalid.
That happended to me when I manipulated with some objects, so when I looped through all objects and passed invalid ones to the funcion, that error showed. The solution for me was to first check if object vas valid.

You should find that funcion somewhere in your mode and debug the data that you pass to it.
Okey, let me explain that again, and let me point out something: I know what I am doing in my gamemode, there's nothing downloaded from other users, only Streamer, sscanf

So, the problem is, as I said here:

Quote:
Originally Posted by Riddick
pawn Код:
new StringName[31];
format(StringName, sizeof(StringName),"%s (%d)", PlayerData[playerid][E_PLAYER_NAME], playerid);
PlayerData[playerid][E_PLAYER_NICK] = CreateDynamic3DTextLabel(StringName, COLOR_NICK, 0.0, 0.0, 0.12, 10.0, playerid, INVALID_VEHICLE_ID, true);
That code is creating player name above his head as soon as they SIGN IN, and then in OnPlayerDisconnect when I am saving player's data I have this code:

pawn Код:
if(IsValidDynamic3DTextLabel(Text3D:PlayerData[playerid][E_PLAYER_NICK]))
{
        DestroyDynamic3DTextLabel(Text3D:PlayerData[playerid][E_PLAYER_NICK]);
}
Which basically means, if my 3D text label has been created (with my name), destroy it. So, why the hell it displays AppendArrayData, as I mentioned in previous post?

edit2://
I have actually added in OnPlayerDisconnect & OnPlayerLogin:
pawn Код:
PlayerData[playerid][E_PLAYER_NICK] = Text3D:INVALID_3DTEXT_ID;
Still same.
Which means, when I comment that line (the one is creating my 3d text label), I don't get AppendArray error anymore.

message did NOT appear in older version, before I updated to the version for 0.3z. I have debugged my whole code, and that is a 3D Text Label problem, error appears for the second time when I connect to the server. Let's say I'm connecting, loggin in and my 3D text label with nick has been created, and then I leave the game, so my 3D text label should be destroyed, and I have also debugged that, and as I said, it destroyed successfully, BUT when I join second time, the problem appears in console.

NO AppendArray data has been use in MY code!
Reply

Well.. any logic behind it? Honestly know, I have checked everything, I have also commented all stuff I had from streamer, includes etc. and it stopped, and basically only 3D Text label displays that error to me, only for the second time when I connect.

I know it doesn't make sense, that's why I'm trying to sort this problem out, or maybe Incognito can help out with this.. I'm gonna try some tomorrow, I just got back from my work, so I'll debug it more.

Thanks for checking source Southclaw.
Reply

Hey Riddick, I tried with your code above, that doesn't happen to me, using SA-MP v0.3Z-R2 and Streamer v2.7.1.
Joined my server, left, joined again, left, no errors. I tried this on windows, not linux.
Reply

Quote:
Originally Posted by Nickvj7
Посмотреть сообщение
Whenever I turn off the server, it occurs (2.7.1)
Код:
[26/04/2014 06:02:01] 

*** Streamer Plugin v2.7.1 by Incognito unloaded ***

[26/04/2014 06:02:01] [debug] Server crashed due to an unknown error
[26/04/2014 06:02:01] [debug] Native backtrace:
[26/04/2014 06:02:01] [debug] #0 004a409b in _ZN10StackTraceC1EPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #1 0049f2d2 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #2 0049febc in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #3 004a0366 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #4 004a3cec in ?? () from plugins/crashdetect.so
[26/04/2014 06:02:01] [debug] #5 00678410 in ?? ()
[26/04/2014 06:02:01] [debug] #6 00678430 in ?? ()
[26/04/2014 06:02:01] [debug] #7 001fbb11 in gsignal () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #8 001fd3ea in abort () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #9 001f4e2b in ?? () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #10 001f4ee6 in ?? () from /lib/libc.so.6
[26/04/2014 06:02:01] [debug] #11 00439806 in ?? () from plugins/streamer.so
[26/04/2014 06:02:01] [debug] #12 00437eb8 in ?? () from plugins/streamer.so
[26/04/2014 06:02:01] [debug] #13 00437f32 in ?? () from plugins/streamer.so
I actually have the same exact thing... Also, no objects are shown... Any ideas?
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
Hey Riddick, I tried with your code above, that doesn't happen to me, using SA-MP v0.3Z-R2 and Streamer v2.7.1.
Joined my server, left, joined again, left, no errors. I tried this on windows, not linux.
Okey, I have made that 3D Text label as FS, and tested it on my debug server, and Streamer_AppendArrayData does not appear anymore, but it still appears in my gamemode. That is weird, because I didn't have it before, I am trying to sort this out, but I am running out of ideas..

Maybe someone has some ideas, what I can do, I am trying to check IsValid function..
Reply

Sorry for double, but it is important to me. I have no idea why it happens, btw. I have checked all my includes, no AppendArray Data in there.

Here's my server_log.txt:

Код:
[16:07:59] Incoming connection: 127.0.0.1:61501
[16:07:59] OnIncomingConnection: 0
[16:07:59] [join] Riddick has joined the server (0:127.0.0.1)
[16:07:59] OnPlayerConnect: 0
[16:08:00] OnPlayerConnectEx: 0
[16:08:00] OnPlayerSpawn: 0
[16:08:07] *** Audio Plugin: Incoming connecting from 127.0.0.1:52642
[16:08:07] *** Audio Plugin: Riddick (ID: 0) has connected
[16:08:07] Audio_OnClientConnect: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:09] Audio_OnTransferFile: 0
[16:08:12] DIALOG_LOGIN: 0
[16:08:12] OnPlayerAttemptLogin: 0
[16:08:12] OnPlayerAttemptLogin #2: Riddick (0)
[16:08:12] Riddick (UID: 1) just logged in.
[16:08:24] OnPlayerDisconnect: 0
[16:08:24] *** Audio Plugin: Riddick (ID: 0) has disconnected
[16:08:24] ClearPlayerData: 0
[16:08:24] [part] Riddick has left the server (0:1)
[16:09:02] Incoming connection: 127.0.0.1:52383
[16:09:02] OnIncomingConnection: 0
[16:09:02] [join] Riddick has joined the server (0:127.0.0.1)
[16:09:02] *** Streamer_AppendArrayData: Invalid ID specified
[16:09:02] OnPlayerConnect: 0
[16:09:02] OnPlayerConnectEx: 0
[16:09:02] OnPlayerSpawn: 0
[16:09:10] *** Audio Plugin: Incoming connecting from 127.0.0.1:52649
[16:09:10] *** Audio Plugin: Riddick (ID: 0) has connected
[16:09:10] Audio_OnClientConnect: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:11] Audio_OnTransferFile: 0
[16:09:13] DIALOG_LOGIN: 0
[16:09:13] OnPlayerAttemptLogin: 0
[16:09:13] OnPlayerAttemptLogin #2: Riddick (0)
[16:09:13] Riddick (UID: 1) just logged in.
That line:
Код:
[16:09:02] *** Streamer_AppendArrayData: Invalid ID specified
Appears as soon as I connect to the server (OnPlayerConnect). I have debugged whole code, I even checked my older version of the gamemode (back ups) it's all the same. So, why the heck that happens?

"0" means my ID.

P.S
My includes:
pawn Код:
#include    <a_samp>
#include    <lookup>
#include    <audio>
#include    <sscanf2>
#include    <foreach>
#include    <streamer>
#include    <a_mysql_R5>

#include    <YSI\y_commands>
#include    <YSI\y_groups>
edit://
OnPlayerDisconnect:
pawn Код:
if(IsValidDynamic3DTextLabel(PlayerData[playerid][E_PLAYER_NICK]))
    {
        Streamer_AppendArrayData(STREAMER_TYPE_3D_TEXT_LABEL, PlayerData[playerid][E_PLAYER_NICK], E_STREAMER_PLAYER_ID, INVALID_PLAYER_ID);
        DestroyDynamic3DTextLabel(PlayerData[playerid][E_PLAYER_NICK]);
    }
OnPlayerAttemptLogin:
pawn Код:
new StringName[40];
        format(StringName, sizeof(StringName),"%s (%d)", PlayerData[playerid][E_PLAYER_NAME], playerid);
        PlayerData[playerid][E_PLAYER_NICK] = CreateDynamic3DTextLabel(StringName, COLOR_NICK, 0.0, 0.0, 0.12, 10.0, playerid, INVALID_VEHICLE_ID, true);
        printf("OnPlayerAttemptLogin #2: %s", StringName);
        Streamer_AppendArrayData(STREAMER_TYPE_3D_TEXT_LABEL, PlayerData[playerid][E_PLAYER_NICK], E_STREAMER_PLAYER_ID, playerid);
I don't even know is that right, but error still appears.

edit2://
I have commented everything I had in my OnPlayerConnect and I have commented everything I had in my OnPlayerDisconnect, also I have commented OnGameModeInit stuff, so basically player is not going anywhere apart OnPlayerConnect & OnPlayerDisconnect callbacks.

I have added to those two callbacks code I had in my filterscript tested on my Debug server (where I did not receive the error). AND I still receive the error, even if the code is exactly the same as on the Debug server.

Anyone?

edit3:// IMPORTANT FIX
Okey fellas, I have downgraded my SA-MP server from 0.3z R2-2 to SA-MP 0.3z R1 (downloaded from SA-MP.com) and I don't receive any error anymore. So, please, Incognito if you could fix it? Thanks.
Reply

Quote:
Originally Posted by Gigi-The-Beast
Посмотреть сообщение
Does anyone know why streamer plugin reverses the order of added data in E_STREAMER_EXTRA_ID ?
I mean when you add an array.
It won't always be in reverse order. E_STREAMER_EXTRA_ID is implemented as an unordered_map (hash table), so the order is just not respected. This is done for fast lookups and insertions (i.e., using Streamer_IsInArrayData and Streamer_AppendArrayData). I suppose something like E_STREAMER_EXTRA_ID_ORDERED could be easily added if you don't care about those things, though.

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
edit3:// IMPORTANT FIX
Okey fellas, I have downgraded my SA-MP server from 0.3z R2-2 to SA-MP 0.3z R1 (downloaded from SA-MP.com) and I don't receive any error anymore. So, please, Incognito if you could fix it? Thanks.
I don't receive that message on any version. The only way it can be printed to the console is if the native is called directly from a script. The underlying function is not used internally.
Reply

I Use Streamer Plugin with CreateDynamicObject

i create objects in virtualworlds to each minigame in my gamemode,

How to delete a object in virtualworld 1, without delete object in virtualworld 30 .??
Reply

Quote:
Originally Posted by RFA
Посмотреть сообщение
I Use Streamer Plugin with CreateDynamicObject

i create objects in virtualworlds to each minigame in my gamemode,

How to delete a object in virtualworld 1, without delete object in virtualworld 30 .??
Delete a specific object you want to remove?

pawn Код:
native DestroyDynamicObject(objectid);
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
It won't always be in reverse order. E_STREAMER_EXTRA_ID is implemented as an unordered_map (hash table), so the order is just not respected. This is done for fast lookups and insertions (i.e., using Streamer_IsInArrayData and Streamer_AppendArrayData). I suppose something like E_STREAMER_EXTRA_ID_ORDERED could be easily added if you don't care about those things, though.



I don't receive that message on any version. The only way it can be printed to the console is if the native is called directly from a script. The underlying function is not used internally.
It would be really useful if you could implement that, if it is not a lot of work.
For now I tested it a lot of times, it never returned in a "normal" order, it was always returned. Strange.
Reply

I use various objects Southclaw, a derby map > 1000 objects..

u recommend use hook metod? put the virtualworld of the object in array??


@Southclaw: Same object only??


Or create a simple function: GetObjectVirtualWorld(objectid); Possible??
Reply

Quote:
Originally Posted by Incognito
Посмотреть сообщение
I don't receive that message on any version. The only way it can be printed to the console is if the native is called directly from a script. The underlying function is not used internally.
And you know what's the best part? I am running 0.3z R2-2 server, and I have that Streamer_AppendArrayData warning message, about IDs, and all the 3D text labels are being created properly, and with proper IDs etc. That interesting, isn't it?

Anybody have any ideas why that message appears? Basically, as I said in my post before.. I have commented all in OnPlayerConnect and I used the code I had in my Debug server, where I did not receive the warning message.

Ideas?
Reply

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
Maybe stack corruption/memory leak/error, some code is in the AMX might be calling the streamer function address.
Should I be aware of that? I don't really want to debug my code line by line, but.. if I'll have to, then yeah. I'll do it.

edit://
How do I save 3D text label ID to the MySQL? Whenever I try, I receive that warning tag mismatch from mysql_query.
Reply

How to make CreateDynamic3DTextLabel can attach to player's body ?
pawn Код:
Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Reply

Quote:
Originally Posted by VenomMancer
Посмотреть сообщение
How to make CreateDynamic3DTextLabel can attach to player's body ?
pawn Код:
Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
why did you ask here?
Reply

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
Should I be aware of that? I don't really want to debug my code line by line, but.. if I'll have to, then yeah. I'll do it.

edit://
How do I save 3D text label ID to the MySQL? Whenever I try, I receive that warning tag mismatch from mysql_query.
Have you tried to strip the tag with _: ?
Reply


Forum Jump:


Users browsing this thread: 9 Guest(s)