Need help.. :( Please help me out. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help.. :( Please help me out. (
/showthread.php?tid=275147)
Need help.. :( Please help me out. -
trapped1 - 08.08.2011
hello all I need help with this code.. So I have 3 skins in one gang but how can I do it?
Код:
warning 206: redundant test: constant expression is non-zero //error 1
warning 217: loose indentation //error 2
Код:
else if (skin == 105, 106, 107) //error 1 is here //Change the 164 According to the Gang So Lets Say gang1 guy skin is 164, This Will Define That 164 is part of gang 3
{
pTeam[playerid] = team_GROVEST;
SetPlayerTeam(playerid, 1);//Change the id according to gang
}
and here
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TEAM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected©)
{
if(GetPlayerTeam© == GetPlayerTeam(playerid))
SendClientMessage(c, GetPlayerColor(playerid), string);
}
}
return 0; //error 2 here
}
return 1;
}
Thank you for your time

and have a good day

I hope you will help me.
I know return 0;//is not like it need to be.. but when I'm trying to fix it nothing change.. idk how to do it right.. All time I can fix the errors almost by my self but now with this I'm stuck..
Re: Need help.. :( Please help me out. -
Kingunit - 08.08.2011
Код:
warning 217: loose indentation //error 2
https://sampforum.blast.hk/showthread.php?tid=256961
Re: Need help.. :( Please help me out. -
trapped1 - 08.08.2011
Hmm how to say .. didn't help me out. but thanks for your post
and now I have this error
Код:
warning 209: function "OnPlayerText" should return a value
error 010: invalid function or declaration
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TEAM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected©)
{
if(GetPlayerTeam© == GetPlayerTeam(playerid))
SendClientMessage(c, GetPlayerColor(playerid), string);
}
return 0; //here
}
}
}
return 1; //and here
}
Re: Need help.. :( Please help me out. -
MadeMan - 08.08.2011
pawn Код:
else if (skin == 105 || skin == 106 || skin == 107)
pawn Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "[TEAM]%s: %s", name, text[1]);
for(new c = 0; c < MAX_PLAYERS; c++)
{
if(IsPlayerConnected(c))
{
if(GetPlayerTeam(c) == GetPlayerTeam(playerid))
SendClientMessage(c, GetPlayerColor(playerid), string);
}
}
return 0;
}
return 1;
}
Re: Need help.. :( Please help me out. -
gesior7 - 09.08.2011
You do alot mess with brackets and indentations. You should read Mean's help few more times carefully.