SA-MP Forums Archive
warning streamer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: warning streamer (/showthread.php?tid=311201)



warning streamer - Andr3y9603 - 15.01.2012

i took on the internet streamer by incognito but give warnings
Quote:

C:\Users\Home\Desktop\RPG RomaniaLife\pawno\include\streamer.inc(417) : warning 201: redefinition of constant/macro (symbol "OnPlayerEnterRaceCheckpoint")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 9996 bytes
Code size: 1570924 bytes
Data size: 5456404 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4123 cells (16492 bytes)
Total requirements: 7053708 bytes

1 Warning.

please help


Re: warning streamer - mSp - 15.01.2012

i guess you have "OnPlayerEnterRaceCheckpoint" callback defined in your script twice. Please look for your script and delete one of those.


Re: warning streamer - Andr3y9603 - 15.01.2012

I do not know what do you mean this is include link : http://www.megaupload.com/?d=DVSYWG33


Re: warning streamer - MR,Mr - 15.01.2012

It's only a warning, you do not need to worry too much!


Re: warning streamer - Andr3y9603 - 15.01.2012

Yes, but I want to solve


Re: warning streamer - Mean - 15.01.2012

You don't understand what does "you have it twice in your script" mean?

here, let me enlighten you:
pawn Код:
public OnPlayerConnect(playerid) {
    return 1;
}

public OnPlayerConnect(playerid) {
    return 1;
}
You have OnPlayerConnect twice. And when it's a redefinition of constant/macro:
pawn Код:
#define OnPlayerEnterRaceCheckpoint(%0,%1) %0something%1something
#define OnPlayerEnterRaceCheckpoint(%0,%1) %0something%1something
Get it?


Re: warning streamer - MR,Mr - 15.01.2012

Quote:
Originally Posted by Mean
Посмотреть сообщение
You don't understand what does "you have it twice in your script" mean?
You don't have a clue what you're on about.

Here, let me enlighten you:

This is incognito streamer which redefines things such as setplayerpos and the one in this topic. This is done so it can perform better object streaming when these commands are used. Yes, it's being redefined, but it's being redefined for a reason in the include.

Next time, read where the source of error is - streamer.inc.


Now, time to help the OP:


Quote:
Originally Posted by Andr3y9603
Посмотреть сообщение
Yes, but I want to solve
I do not recommend playing with the streamer include too much - I'd ignore it and it should be okay, unless it's affecting gameplay, or streaming, it's probably best left alone to avoid breaking something else.


Re: warning streamer - niels44 - 15.01.2012

a'ight eehm maybe this works: go to your pawno file and press lctrl+F and then enter there: public onplayerenterracecheckpoint
then it goes to the place where it is standing... and just delete the whole thing... so when u searched for the racecheckpoint thing then u probabbly see this:
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    return 1;
}
so just delete this part of ur script and then it will probably solved... ( NOTE: if there is standing something under the onplayerenterracecheckpoint then dont delete it, but search for the other one and delete that one else ur gamemode/filterscript wont work properly anymore.)


Re: warning streamer - Mean - 15.01.2012

Quote:
Originally Posted by MR,Mr
Посмотреть сообщение
You don't have a clue what you're on about.

Here, let me enlighten you:

This is incognito streamer which redefines things such as setplayerpos and the one in this topic. This is done so it can perform better object streaming when these commands are used. Yes, it's being redefined, but it's being redefined for a reason in the include. It is not here to stream better, it's here to stream in general.

Next time, read where the source of error is - streamer.inc.


Now, time to help the OP:




I do not recommend playing with the streamer include too much - I'd ignore it and it should be okay, unless it's affecting gameplay, or streaming, it's probably best left alone to avoid breaking something else.
If it was redefined properly, it would never give a warning. Incognito defined everything properly. It's his issue. He has to remove the extra redefinition and it's all OK.

Also, streamer does not redefine SetPlayerPos. At least not Incognito's. The OnPlayerEnterRaceCheckpoint(playerid) is defined in the streamer, but however, he has it somewhere in the script, which he shouldn't have.

Also, a redefinition of a constant/macro, would be:
pawn Код:
#define OnPlayerEnterRaceCheckpoint something
#define OnPlayerEnterRaceCheckpoint something
As in the streamer, it's:
pawn Код:
#define OnPlayerEnterRaceCheckpoint Streamer_OnPlayerEnterRaceCP
and somewhere else in his script/include (in case he edited it), he has:
pawn Код:
#define OnPlayerEnterRaceCheckpoint something
He has "OnPlayerEnterRaceCheckpoint" in his defines twice, including the streamer's one.

@ the topic starter: this shouldn't affect gameplay, if it doesn't, you can make your compiler ignore the warning, search, found a way to do it recently. Warnings should never be ignored, but if it really doesn't affect you, ignore it.


Re: warning streamer - Andr3y9603 - 15.01.2012

Quote:

public OnPlayerEnterRaceCheckpoint(playerid)
{
if (!IsPlayerNPC(playerid))
{
Streamer_VerifyCheckpoint(playerid, STREAMER_TYPE_RACE_CP, 0);
}
if (Streamer_g_OPERC)
{
return CallLocalFunction("Streamer_OnPlayerEnterRaceCP", "d", playerid);
}
return 1;
}

and
Quote:

#undef OnPlayerEnterRaceCheckpoint

and
Quote:

#define OnPlayerEnterRaceCheckpoint Streamer_OnPlayerEnterRaceCP

only so we found with ctrl + F