CCS code won't work (SOLVED)

Started by mport2004, Thu 10/03/2005 03:01:02

Previous topic - Next topic

mport2004

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

strazer

It looks like your second ccCreateCommand string is too long.
Try moving some of the CCS commands in additional ccAppendCommand functions.

mport2004

#2
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!?!?!?

strazer

Try this:

Code: ags

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.

mport2004

 yay it worked but I'm starting to have doubts about the compatability of ccs w/ ags

SMF spam blocked by CleanTalk