Help to new scripter :) -
Vladimir124 - 10.03.2015
I saw one guy who trying to fix some problems and he fix 2 or 5 or whatever, just help him to fix that one problem becouse i see to hi is a good guy
He have this problem
Код:
C:\Users\PC\Desktop\ECRPG\ECRPG\gamemodes\ECRPG.pwn(6503) : error 021: symbol already defined: "Itter_OnPlayerDisconnect"
WHO KNOW WHAT IS A PROBLEM TYPE HERE.
(he probably will see this post

)
Re: Help to new scripter :) -
Pocetnik - 10.03.2015
Thank you
Re: Help to new scripter :) -
Vladimir124 - 10.03.2015
Every time bro
Re: Help to new scripter :) -
Smileys - 10.03.2015
Err perhaps show us your code?
Lines 6490 - 6520 in particular.
Re: Help to new scripter :) -
Vladimir124 - 10.03.2015
yea bro
Re: Help to new scripter :) -
Pocetnik - 10.03.2015
Код:
else
{
new rand = random(5000); rand += 2158;
Jackpot += rand;
SaveStuff();
format(string, sizeof(string), "Loto vesti: JackPot je povecan na $%d.", Jackpot);
OOCOff(COLOR_WHITE, string);
}
return 1;
}
//------------------------------------------------------------------------------------------------------
public OnPlayerDisconnect(playerid, reason)
{ //It show me error here
new textreason[64];
new plname[24];
GetPlayerName(playerid, plname, sizeof(plname));
new playersip[24];
GetPlayerIp(playerid, playersip, sizeof(playersip));
new string2[128];
SafeResetPlayerWeapons(playerid);
if(PlayerInfo[playerid][pAdminDuty] == 1)
{
SafeResetPlayerWeapons(playerid);
}
if(Searching[playerid] == 1)
{
RemovePlayerMapIcon(playerid, 500 + playerid);
Searching[playerid] = 0;
}
Re: Help to new scripter :) -
CalvinC - 11.03.2015
Quote:
Originally Posted by Smileys
Err perhaps show us your code?
Lines 6490 - 6520 in particular.
|
As i said in the other topic, it's caused by most likely an include, so the lines doesn't matter.
A lot of includes has to define includes as "public Itter_OnPlayerDisconnect" or something, otherwise if they just used the plain "public OnPlayerDisconnect", it would return errors, so thereby if there's 2 includes using "Itter_OnPlayerDisconnect", it would give you the error it is.
You might not understand it, but it's most likely an include that has been included twice, although i've only heard of foreach (y_iterate) using Itter_OnPlayerDisconnect.
You should check for any includes that could be included twice though.
Re: Help to new scripter :) -
Pocetnik - 11.03.2015
I understand, thank you, I'll try to find that include which gving me Itter_OnPlayerDisconnect

but when i find what i need to do
Re: Help to new scripter :) -
CalvinC - 11.03.2015
Then make sure that include is only included once, and not twice in your script, by deleting the second #include.
Re: Help to new scripter :) -
Pocetnik - 11.03.2015
I find some code where i have that but i have just 1 #include <foreach>
Here is the codes where i have foreach
This is all lines where i have foreach
Код:
else
{
#if !defined foreach
#define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
#define __SSCANF_FOREACH__
#endif
Код:
foreach (Player, playerid)
{
GetPlayerName(playerid, name, sizeof (name));
if (!strcmp(name, string[stringPos], true, id))
{
setarg(paramPos, 0, playerid);
num = true;
break;
}
Код:
}
string[end] = ch;
#if defined __SSCANF_FOREACH__
#undef foreach
#undef __SSCANF_FOREACH__
#endif
}
Код:
if(dialogid == 1996 && response)
{
foreach(Player, i)
{
if(listitem == 0)
{
PlayAudioStreamForPlayer(i, "http://k003.kiwi6.com/hotlink/q6s8genu5u/harlem_shake_-_full_song.mp3");
}
if(listitem == 1)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/9f3oh40rqf/swedish_house_mafia_-_one_original_mix_.mp3");
}
if(listitem == 2)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/nbxrfl79mb/fkn_insane_-_dj_bl3nd.mp3");
}
if(listitem == 3)
{
PlayAudioStreamForPlayer(i, "http://balkan.dj.topstream.net:8070/listen.pls");
}
if(listitem == 4)
{
PlayAudioStreamForPlayer(i, "http://k005.kiwi6.com/hotlink/s7q0gs024e/lmfao_imsexyy.mp3");
}
if(listitem == 5)
{
PlayAudioStreamForPlayer(i, "http://k005.kiwi6.com/hotlink/58ck46m7zd/dadoinvivoparty.mp3");
}
if(listitem == 6)
{
PlayAudioStreamForPlayer(i, "http://k002.kiwi6.com/hotlink/xi21jn2sus/psy_-_gentleman_m_v.mp3");
}
if(listitem == 7)
{
PlayAudioStreamForPlayer(i, "http://k004.kiwi6.com/hotlink/8gdl57vlzi/gangnam_style.mp3");
}
if(listitem == 8)
{
PlayAudioStreamForPlayer(i, "http://streaming.tdiradio.com:9000/listen.pls");
}
if(listitem == 9)
{
StopAudioStreamForPlayer(i);
}
}
}
Код:
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
foreach(Player, i)
{
PlayerInfo[i][pLevel] += 1;
}
new str[128];
format(str, sizeof(str), "Cestitamo dobili ste level up od admina!!");
SendClientMessageToAll(COLOR_LIGHTBLUE,str);
format(string, sizeof(string), "[ADMIN]: %s je dao svim igracima level up.", sendername);
ABroadCast(COLOR_LIGHTRED,string, 5);
return 1;
}