SA-MP Forums Archive
Whats the problem coming???Why can't I run this - 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: Whats the problem coming???Why can't I run this (/showthread.php?tid=617041)



Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

if(strcmp(cmdtext,"/staff",true)== 0)
{
SendClientMessage(playerid,0xFFFFFFFF,"--------------------- Staff Team ----------------------");
SendClientMessage(playerid,0xFF0000FF,"-- Server Owner : Trey");
SendClientMessage(playerid,0xFF0000FF,"-- Server Scripter : Somil, Wraith and try");
SendClientMessage(playerid,0xFF0000FF,"-- Server Co-owner : Wraith");
SendClientMessage(playerid,0xFF0000FF,"-- Server Life Time Excutive admin: Somil");
SendClientMessage(playerid,0xFF0000FF,"-- Server Lead Head Admin: BurnKiller");
SendClientMessage(playerid,0xFF0000FF,"-- Server Head Admin: KeweJr");
SendClientMessage(playerid,0xFF0000FF,"-- Server Senior Admin : Vacant");
SendClientMessage(playerid,0xFF0000FF,"-- Server General Admin : Vacant");
SendClientMessage(playerid,0xFF0000FF,"-- Server Junior Admin : Vacant");
SendClientMessage(playerid,0xFFFFFFFF,"-----------------------------------------------------");
return 1;
}


Re: Whats the problem coming???Why can't I run this - DwayneMichael - 14.09.2016

Atleast show the warnings/errors you receive..


Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(1) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(3) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(6) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(11) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(14) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(15) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(16) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(17) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(1 : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(19) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(20) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(21) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(22) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(23) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(24) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(2 : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(36) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


17 Errors.


Re: Whats the problem coming???Why can't I run this - Dayrion - 14.09.2016

Can you put your code into this balise please:
[code] [/code.] (w/o the . )
Do you have this at the top of your script?
PHP Code:
#include <a_samp> 



Re: Whats the problem coming???Why can't I run this - Ultraz - 14.09.2016

Quote:
Originally Posted by Dayrion
View Post
Can you put your code into this balise please:
[code] [/code.] (w/o the . )
Do you have this at the top of your script?
PHP Code:
#include <a_samp> 
Yes , Check you have | #include <a_samp> | in the top of your script , i tested it on my script , no 1 error.


Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(3) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(16) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

2 errors left


Re: Whats the problem coming???Why can't I run this - Dragony92 - 14.09.2016

Show us lines 3 and 16.


Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

Quote:

According to this error

C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(2) : error 010: invalid function or declaration
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(15) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

15 and 2 lines are


Quote:

return 1;

15

Quote:

if(strcmp(cmdtext,"/staff",true)== 0)

second




Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

Tell me fast


Re: Whats the problem coming???Why can't I run this - iLearner - 14.09.2016

is it under

public OnPlayerCommandText(playerid, cmdtext[])
{
{

}

?


Re: Whats the problem coming???Why can't I run this - Dragony92 - 14.09.2016

That block of code should go under https://sampwiki.blast.hk/wiki/OnPlayerCommandText


Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

What do u mean


Re: Whats the problem coming???Why can't I run this - iLearner - 14.09.2016

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
 if(
strcmp(cmdtext,"/staff",true))
  {
    
SendClientMessage(playerid,0xFFFFFFFF,"--------------------- Staff Team ----------------------");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Owner : Trey");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Scripter : Somil, Wraith and try");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Co-owner : Wraith");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Life Time Excutive admin: Somil");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Lead Head Admin: BurnKiller");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Head Admin: KeweJr");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Senior Admin : Vacant");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server General Admin : Vacant");
    
SendClientMessage(playerid,0xFF0000FF,"-- Server Junior Admin : Vacant");
    
SendClientMessage(playerid,0xFFFFFFFF,"-----------------------------------------------------");
   return 
1;
  }
    return 
0;




Re: Whats the problem coming???Why can't I run this - Johnu - 14.09.2016

C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(3) : warning 235: public function lacks forward declaration (symbol "OnPlayerCommandReceived")
C:\Users\Vijay\Desktop\Cool filterscripts\Staff team script.pwn(5) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.


Re: Whats the problem coming???Why can't I run this - iLearner - 14.09.2016

Read Above ^