How should i fix 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How should i fix this? (
/showthread.php?tid=261555)
How should i fix this? -
jot16 - 14.06.2011
this is the code:
Quote:
{
if(strcmp(cmd, "/handsup", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HAN DSUP);
return 1;
}
|
plz tell me how should i fix that and under what category should i put that?i just put that at end of the GM.i tried on lvdm GM that come with SA-MP server sameple scripts.plz fix my errors.
i get these error when i tried to make an animation:
Quote:
C:\Users\Jot\Desktop\SAMP Server\gamemodes\lvdm.pwn(928 ) : error 055: start of function body without function header
C:\Users\Jot\Desktop\SAMP Server\gamemodes\lvdm.pwn(929) : error 010: invalid function or declaration
C:\Users\Jot\Desktop\SAMP Server\gamemodes\lvdm.pwn(932) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
|
Re: How should i fix this? -
Skaizo - 14.06.2011
Код:
if(strcmp(cmd, "/handsup", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
Re: How should i fix this? -
jot16 - 14.06.2011
Quote:
Originally Posted by [RSS]Cops_sandu
Код:
if(strcmp(cmd, "/handsup", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
|
now it's this probelm
Quote:
C:\Users\Jot\Desktop\SAMP Server\gamemodes\lvdm.pwn(929) : error 010: invalid function or declaration
C:\Users\Jot\Desktop\SAMP Server\gamemodes\lvdm.pwn(932) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
|
is there any place that i just have to place under that, nowhere else.
Re: How should i fix this? -
jot16 - 14.06.2011
also do i need any kind of include?
Re: How should i fix this? -
Raimis_R - 14.06.2011
where you puting this command?
Re: How should i fix this? -
Skaizo - 14.06.2011
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/handsup", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
Re: How should i fix this? -
jot16 - 14.06.2011
Quote:
Originally Posted by Raimis_R
where you puting this command?
|
all the way at end of the GM
Re: How should i fix this? -
Raimis_R - 14.06.2011
So this its your problem put this command in OnPlayerCommandText callback
Re: How should i fix this? -
jot16 - 14.06.2011
Quote:
Originally Posted by [RSS]Cops_sandu
|
i knw i just copied and paste that to add actions to that GM.
Re: How should i fix this? -
Skaizo - 14.06.2011
Quote:
Originally Posted by jot16
i knw i just copied and paste that to add actions to that GM.
|
I edited:
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmd, "/handsup", true) == 0)
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
return 1;
}
}
becouse you are command the command put in public OnPlayerCommandText(playerid, cmdtext[])