dcmd warning
#1

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.
Reply
#2

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

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.
Reply
#4

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.
Reply
#5

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

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.
Reply
#7

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.
Reply
#8

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)