CCTV - Server Unknown Command - 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: CCTV - Server Unknown Command (
/showthread.php?tid=66581)
CCTV - Server Unknown Command -
Mikep - 23.02.2009
<removed>
Re: CCTV - Server Unknown Command -
yom - 23.02.2009
It seem obvious that the problem is SetCam.
Re: CCTV - Server Unknown Command -
x-cutter - 23.02.2009
Quote:
Originally Posted by 0rb
It seem obvious that the problem is SetCam.
|
Exactly, cause the command doesn't seem to have any problems.
Re: CCTV - Server Unknown Command -
Mikep - 23.02.2009
<removed>
Re: CCTV - Server Unknown Command -
yom - 23.02.2009
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));
Re: CCTV - Server Unknown Command -
MenaceX^ - 23.02.2009
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.
Re: CCTV - Server Unknown Command -
Mikep - 23.02.2009
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.
Re: CCTV - Server Unknown Command -
Norn - 23.02.2009
I could have told you that lol.