CCTV - Server Unknown Command
#1

<removed>
Reply
#2

It seem obvious that the problem is SetCam.
Reply
#3

Quote:
Originally Posted by 0rb
It seem obvious that the problem is SetCam.
Exactly, cause the command doesn't seem to have any problems.
Reply
#4

<removed>
Reply
#5

Well you do
pawn Код:
else if(CurrentCam[playerid] < 3)
  SetCam(playerid,CurrentCam[playerid]+1);
So CurrentCam[playerid]'s greater value is 3.

So the SetCam's camid, from your code, range from 0 to 3, and that is 4 cameras (0, 1, 2, 3).. and your cameras array size is only 3.

I think something like this is just better than your whole if/else if:
pawn Код:
SetCam(playerid, (CurrentCam[playerid] + 1) & (sizeof cameras - 1));
Reply
#6

I don't really know but, When I had a problem with "SERVER: Unknown Command."
I just changed the cmd like
if(strcmp(cmdtext,"/next",true)==0)
to
if(!strcmp(cmd,"/next",true))
And it got fixed.. Since this I use only this way.
Reply
#7

Found the problem, camera 3 doesn't exist.

Its 0 1 and 2, its lower than 3, so it tries to set it to 3, which doesnt exit.

P.S: I figured out before 0rbs post.
Reply
#8

I could have told you that lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)