Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: mport2004 on Thu 10/03/2005 03:01:02

Title: CCS code won't work (SOLVED)
Post by: mport2004 on Thu 10/03/2005 03:01:02
this is my ccs code when i try to test my game it says

error:ccCreatecommand(): SET control command error!

and this is all of my ccs codes i have

function game_start() {

ccDebug(0);
ccSetBlankView(5);

ccCreateCommand(1, "MOVE: 200, 115; MOVE: 310, 118; ROOM:4,13,110; MOVE: 155, 115; MOVE: 150, 180; MOVE: 10, 188; ROOM:3, 300,180; MOVE: 250, 180; MOVE: 70, 140; GOTO:1;");
ccCreateCommand(2, "MOVE: 150, 140; MOVE: 150, 110;
SET:Global(11)=0; ROOM:16,150,190; SET:Global(10)=0; MOVE: 150, 140; MOVE: 150, 110; MOVE: 150, 140; MOVE: 150, 190; SET:Global(10)=0; WAIT:120; ROOM:14,150,110; SET:Global(11)=1; MOVE: 150, 140;");
ccAppendCommand(2, "MOVE: 150, 190; SET:Global(11)=1; MOVE: 150, 140; MOVE: 150, 190; GOTO:2;");



}




i cant see wats wrong with it it was working fine a day ago. ??? ??? ??? ??? ???
Title: Re: code wont work
Post by: strazer on Thu 10/03/2005 03:11:00
It looks like your second ccCreateCommand string is too long.
Try moving some of the CCS commands in additional ccAppendCommand functions.
Title: Re: code wont work
Post by: mport2004 on Thu 10/03/2005 17:16:00
i tryed that once but every time i move a ccs command some of the others dont work.

also i notised i have 2 SET:Global(11)=1; commands in there


>:( >:( >:(
i got rid of the SET:Global(11)=0; command and i worked but i need that command!?!?!?
Title: Re: code wont work
Post by: strazer on Thu 10/03/2005 17:31:27
Try this:


ccCreateCommand(1, "MOVE:200,115;MOVE:310,118;");
ccAppendCommand(1, "ROOM:4,13,110;MOVE:155,115;MOVE:150,180;MOVE:10,188;");
ccAppendCommand(1, "ROOM:3,300,180;MOVE:250,180;MOVE:70,140;GOTO:1;");

ccCreateCommand(2, "MOVE:150,140;MOVE:150,110;SET:Global(11)=0;");
ccAppendCommand(2, "ROOM:16,150,190;SET:Global(10)=0;MOVE:150,140;MOVE:150,110;MOVE:150,140;MOVE:150,190;SET:Global(10)=0;WAIT:120;");
ccAppendCommand(2, "ROOM:14,150,110;SET:Global(11)=1;MOVE:150,140;MOVE:150,190;SET:Global(11)=1;MOVE:150,140;MOVE:150,190;GOTO:2;");


All I did was remove all the spaces (not sure if they are allowed or not) and break the strings up in more commands.
Title: Re: code wont work
Post by: mport2004 on Thu 10/03/2005 17:36:24
 yay it worked but I'm starting to have doubts about the compatability of ccs w/ ags