SA-MP Forums Archive
commandtext problem - 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: commandtext problem (/showthread.php?tid=553916)



commandtext problem - semara123 - 01.01.2015

hey there someone can help me plz i need some help for my code here is the code

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/test", cmdtext, true, 10) == 0)
	{
	    new Year, Month, Day;
		getdate(Year, Month, Day);
		printf("%02d/%02d/%d", Day, Month, Year);
		if(fap[playerid] == 1)return ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You already connected to the server", "Close", "");
		if(Month == 01 && Year == 2015 && Day == 01) 
  		{
  		fap[playerid] = 1;
		ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server", "Close", "");
		}
		else
		{
		ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You disconnected from the server", "Close", "");
		}
		if(yeah[playerid] == 1)return ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You already connected to the server2", "Close", "");
        if(Month == 01 && Year == 2015 && Day == 02) 
		{
		yeah[playerid] = 1
		ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server2", "Close", ""); // line 80
		}
		else
		{
		ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You disconnected from the server2", "Close", "");
		}
		return 1;
	}
	return 0;
}
and i got this error
Код:
F:\(0.3z) Crazy - Server Pack\filterscripts\senpai2.pwn(80) : error 001: expected token: ";", but found "-identifier-"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
thanks for the help
sorry for mybad english


Re: commandtext problem - iggy1 - 01.01.2015

As the error says your missing a semi-colon.

pawn Код:
yeah[playerid] = 1// here's the offender



Re: commandtext problem - BroZeus - 01.01.2015

You missed a ; on line 79
Make it like this
Quote:

yeah[playerid] = 1;
EDIT : late


Re: commandtext problem - semara123 - 01.01.2015

thanks for u guys i didn't see that +rep for u guys

(stress on school)