SA-MP Forums Archive
What's wrong with that code ? - 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: What's wrong with that code ? (/showthread.php?tid=198339)



What's wrong with that code ? - Dark734 - 11.12.2010

if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
{
format(string, sizeof(string), "(MEGAPHONE) %s: %s", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Megaphone): %s",d,m,y,h,mi,s, sendername, result);

return 1;
}



Thanks for helping,
-Alex


Re: What's wrong with that code ? - Scenario - 11.12.2010

Quote:
Originally Posted by Dark734
Посмотреть сообщение
if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
{
format(string, sizeof(string), "(MEGAPHONE) %s: %s", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Megaphone): %s",d,m,y,h,mi,s, sendername, result);

return 1;
}



Thanks for helping,
-Alex
Why don't you explain the problem you are having with the code?


Respuesta: What's wrong with that code ? - OwlCity - 11.12.2010

Which is the compiler error?
pawn Код:
if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
{
format(string, sizeof(string), "(MEGAPHONE) %s: %s", sendername, result);
ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLO R_YELLOW,COLOR_YELLOW);
format(string, sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s (Megaphone): %s",d,m,y,h,mi,s, sendername, result);//This line doesn't do anything (you should delete the line or add something)

return 1;
}



Re: What's wrong with that code ? - SkizzoTrick - 11.12.2010

Woww man,it is totally fucked if you didn't defined the

result,sendername,tmp etc
Too short