SA-MP Forums Archive
[SOLVED]Help with error - 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: [SOLVED]Help with error (/showthread.php?tid=148495)



[SOLVED]Help with error - Ykelder - 17.05.2010

If I want to add a command I always get: error 010: invalid function or declaration

What does that command mean?

Please help me


Re: Help with error - ViruZZzZ_ChiLLL - 17.05.2010

Show us the code then so we can help you


Re: Help with error - Nee - 17.05.2010

Post the error code line something...


Re: Help with error - Ykelder - 17.05.2010

I just copied this from GTARP but I want to edit these lines later but I get it in here
Код:
if(strcmp(cmd, "/help", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
		  SendClientMessage(playerid, COLOR_GREEN,":: ACCOUNT :: /rules /stats /changepass /levelup /upgrade");
			SendClientMessage(playerid, COLOR_GREEN,":: GENERAL :: /pay /charity /time /buy /unrentcar /unrentbike /switchkey /id /drink /clothes /opendoor(/od)");
			SendClientMessage(playerid, COLOR_GREEN,":: GENERAL :: /resetupgrades(50k) /buygun /lock /skill /licenses /showlicenses(/sl) /report /askq /animlist /stopanim /fuel");
			SendClientMessage(playerid, COLOR_GREEN,":: GENERAL :: (/re)port /cancel /accept /eject /usedrugs /contract /fill /admins (/f)actionlist");
			SendClientMessage(playerid, COLOR_GREEN,":: GENERAL :: (/wi)ndows /coin /trunk (/inv)entory /knock /knockout /give /gateopen /sid /smoke");
	 		SendClientMessage(playerid, COLOR_GREEN,":: CHAT :: (/p)me (/cw)hisper (/o)oc (/s)hout /low (/b) (/f)action /me /do /togooc /tognews /togfam /togpm /togphone");
			SendClientMessage(playerid, COLOR_GREEN,":: BANK :: /balance /withdraw /deposit /wiretransfer");
			}
		return 1;
}
I get the errors at if and return


Re: Help with error - ViruZZzZ_ChiLLL - 17.05.2010

I suggest you make your own /cmds list
and also, use dcmd


Re: Help with error - Ykelder - 17.05.2010

That wasn't my question... Please tell me why I get errors on the line with If and return


Re: Help with error - ViruZZzZ_ChiLLL - 17.05.2010

Quote:
Originally Posted by Ykelder
That wasn't my question... Please tell me why I get errors on the line with If and return
It was only a suggestion
anyways here try this
pawn Код:
if(strcmp(cmdtext, "/help", true) == 0)



Re: Help with error - Ykelder - 17.05.2010

Still those 3 errors... It gives an error everytime I put somewhere: if or return or something


Re: Help with error - NewTorran - 17.05.2010

Show us your OnPlayerCommandText callback


Re: Help with error - ViruZZzZ_ChiLLL - 17.05.2010

IDK, I tested this script and compiled it it doesn't give error
Quote:
Originally Posted by Joe Torran C
Show us your OnPlayerCommandText callback