SA-MP Forums Archive
dcmd warning - 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: dcmd warning (/showthread.php?tid=105698)



dcmd warning - _Vortex - 30.10.2009

I'm getting this warning with DCMD

This is the line thats getting the error, and the error its getting.

Код:
dcmd(lv, 2, cmdtext);

argument type mismatch (argument 2)
I'm not sure if you need any more information, if you do, just tell me.



Re: dcmd warning - dice7 - 30.10.2009

pawn Код:
dcmd("lv", 2, cmdtext);



Re: dcmd warning - _Vortex - 30.10.2009

Quote:
Originally Posted by dice7
pawn Код:
dcmd("lv", 2, cmdtext);
now i get these on that line.

Код:
C:\Users\Damien\Desktop\samp server 0.3\gamemodes\sffr.pwn(119) : error 017: undefined symbol "dcmd_"
C:\Users\Damien\Desktop\samp server 0.3\gamemodes\sffr.pwn(119) : error 029: invalid expression, assumed zero
C:\Users\Damien\Desktop\samp server 0.3\gamemodes\sffr.pwn(119) : error 029: invalid expression, assumed zero
C:\Users\Damien\Desktop\samp server 0.3\gamemodes\sffr.pwn(119) : fatal error 107: too many error messages on one line
I've NEVER put quotes for the command it's going to be.


Re: dcmd warning - Blacklite - 30.10.2009

Are you sure your DCMD is defined correctly? That looks fine to me..

Also, where is your "dcmd_lv(playerid, params[])"?

Post the code where that starts, too.


Re: dcmd warning - [HUN]Gamestar - 30.10.2009

lol...
pawn Код:
dcmd(lv,strlen("lv"),cmdtext);
dcmd_lv(playerid,params[]) {
  return 1;
}



Re: dcmd warning - Blacklite - 30.10.2009

Quote:
Originally Posted by [HuN
Gamestar ]
lol...
pawn Код:
dcmd(lv,strlen("lv"),cmdtext);
dcmd_lv(playerid,params[]) {
  return 1;
}
That is inefficient. There is no need to do strlen("lv"), because you know it will always be 2.


Re: dcmd warning - _Vortex - 30.10.2009

Quote:
Originally Posted by Blacklite
Are you sure your DCMD is defined correctly? That looks fine to me..

Also, where is your "dcmd_lv(playerid, params[])"?

Post the code where that starts, too.
Код:
dcmd_lv(playerid,cmdtext)
{
	#pragma unused cmdtext
	SetPlayerPos(playerid,2098.4771,1159.6377,11.6484);
	SetPlayerFacingAngle(playerid,62.3579);
	return 1;
}
Quote:
Originally Posted by [HuN
Gamestar ]
lol...
pawn Код:
dcmd(lv,strlen("lv"),cmdtext);
dcmd_lv(playerid,params[]) {
  return 1;
}
I've never had to do that. I don't see the need to start. There has to be some reason why it's doing this.


Re: dcmd warning - Blacklite - 30.10.2009

Код:
dcmd_lv(playerid,cmdtext[])
{
	#pragma unused cmdtext
	SetPlayerPos(playerid,2098.4771,1159.6377,11.6484);
	SetPlayerFacingAngle(playerid,62.3579);
	return 1;
}



Re: dcmd warning - _Vortex - 30.10.2009

Quote:
Originally Posted by Blacklite
Код:
dcmd_lv(playerid,cmdtext[])
{
	#pragma unused cmdtext
	SetPlayerPos(playerid,2098.4771,1159.6377,11.6484);
	SetPlayerFacingAngle(playerid,62.3579);
	return 1;
}
Wow, stupid mistake :P Thanks.