SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 25/04/2014, 03:52 PM   #4621
Gigi-The-Beast
Huge Clucker
 
Join Date: Jan 2010
Posts: 288
Reputation: 25
Default Re: Streamer Plugin

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.
Gigi-The-Beast is offline   Reply With Quote
Old 26/04/2014, 03:21 PM   #4622
Locky_
High-roller
 
Join Date: Jul 2012
Posts: 1,414
Reputation: 255
Unhappy Re: Streamer Plugin

Whenever I turn off the server, it occurs (2.7.1)
Code:
[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
__________________
Locky_ is offline   Reply With Quote
Old 26/04/2014, 10:01 PM   #4623
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,948
Reputation: 185
Default Re: Streamer Plugin

Quote:
Originally Posted by Gigi-The-Beast View Post
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
Code:
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:

Code:
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:
Code:
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!
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 26/04/2014, 10:25 PM   #4624
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,724
Reputation: 1257
Default Re: Streamer Plugin

I've been digging through the source and this is how far I got:

Your error print: https://github.com/samp-incognito/sa...tion.cpp#L2632
Called from this function: https://github.com/samp-incognito/sa...tion.cpp#L2577

Which is found in these places: https://github.com/samp-incognito/sa...ta&ref=cmdform

The actual CreateDynamic3DTextLabel function doesn't appear to have any reference to that print at all but I'm not an expert at C++ so my analysing skills are limited.
[HLF]Southclaw is offline   Reply With Quote
Old 26/04/2014, 10:38 PM   #4625
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,948
Reputation: 185
Default Re: Streamer Plugin

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.
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 27/04/2014, 12:19 AM   #4626
Gigi-The-Beast
Huge Clucker
 
Join Date: Jan 2010
Posts: 288
Reputation: 25
Default Re: Streamer Plugin

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.
Gigi-The-Beast is offline   Reply With Quote
Old 27/04/2014, 05:33 AM   #4627
Scones
Huge Clucker
 
Scones's Avatar
 
Join Date: Sep 2008
Location: 127.0.0.1
Posts: 445
Reputation: 57
Default Re: Streamer Plugin

Quote:
Originally Posted by Nickvj7 View Post
Whenever I turn off the server, it occurs (2.7.1)
Code:
[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?
__________________
Scones is offline   Reply With Quote
Old 27/04/2014, 04:32 PM   #4628
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,948
Reputation: 185
Default Re: Streamer Plugin

Quote:
Originally Posted by Gigi-The-Beast View Post
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..
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone
Riddick94 is offline   Reply With Quote
Old 29/04/2014, 03:57 PM   #4629
Riddick94
High-roller
 
Riddick94's Avatar
 
Join Date: Mar 2010
Location: Poland
Posts: 1,948
Reputation: 185
Default Re: Streamer Plugin

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:

Code:
[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:
Code:
[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:
Code:
#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:
Code:
	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:
Code:
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.
__________________
Have spent some great time of my life here since 0.1b version of SA-MP. I will never-ever forget the times I have had so much fun with people around here, during gameplay, scripting and being invented in so many SA-MP projects. Maybe I wasn't so active in FS/INC/GM sections to some of you and never have released that much but there's a reason behind it which isn't actually work mentioning. I am here to say goodbye to everyone and thanks for all the good times. TLoU (SA-MP) project shall never be finished because of me - but there's nothing we can do about it really. I think I am too old for all of it and same for the gaming (I guess) - I just can not let myself spend any more time in this addictive modification for GTA:SA. I have got something out of it and I respect it so much. Saying that I owe SA-MP my current job that I have is more than enough. There's not any certain steps that you have to take in order to achieve your goals.

Much love from Uncle Riddick and take care everyone

Last edited by Riddick94; 29/04/2014 at 06:42 PM.
Riddick94 is offline   Reply With Quote
Old 02/05/2014, 11:58 PM   #4630
Incognito
Huge Clucker
 
Join Date: May 2006
Posts: 449
Reputation: 487
Default Re: Streamer Plugin

Quote:
Originally Posted by Gigi-The-Beast View Post
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 View Post
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.
Incognito is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Include] Checkpoint / Area sub-streamer for incognito's streamer plugin Pottus Includes 11 21/03/2014 07:31 PM
Need 3dtextlabel Streamer And Gangzone Streamer !! Please Help . Not streamer plugin . jame42 Scripting Help 4 30/05/2012 08:33 AM
Streamer plugin 0.3d rt-2 Plugin Development 7 05/12/2011 07:17 PM
Streamer Plugin Help! ColdXX Everything and Nothing 2 21/08/2010 11:28 PM
Streamer Plugin! ColdXX Help Archive 10 18/07/2010 01:47 PM


All times are GMT. The time now is 08:39 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.