Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Reserved word or undocumented verb?
Reserved word or undocumented verb?
2005-12-05, 9:44 AM #1
First the story:

I was cogging along and my cog stopped working. Odd I thought, after alot of frustrating testing on a hunch I renamed my one of my call commands and the accompanying message and it started working again. It didnt matter if the message was declared in symbols or not. I looked in Datamaster and couldnt find any documentation of it, I loaded Parsec and Scribe. Parsec returns the error it does on all custom messages, Scribe found no errors. I figured it's time to throw it to the experts and see if you guys knew this or not.

now the 'bad' word: continue

Example (doesnt work):

Code:
activated:
                  call continue;
                  Return;
continue:
                  PlaySoundThing(mysound, GetLocalPlayerThing(), 1.0, -1, -1, 128);
                  Return;


Example (this works):
Code:
activated:
                  call acontinue;
                  Return;
acontinue:
                  PlaySoundThing(mysound, GetLocalPlayerThing(), 1.0, -1, -1, 128);
                  Return;


Anyone encounter this before? Im too lazy to do random testing. Think it does anything? Im guessing continue(); isnt a cog verb because most of those are defined in jk.exe, so its probably a cog keyword or just a something that jams up JK's cogparser.

If its indeed a cog keyword, Im guessing its fuction is or was supposed to be similar to break;
Admin of Narshaddaa.net's dedicated server. For more information on about the dedicated server: http://jkdf2.net/
2005-12-05, 9:51 AM #2
Yeah Im pretty sure its just a cog keyword from its C roots. Like I just tried goto instead of call in cog and that works the same way. You guys probably knew this, hopefully one of those new wiki's you guys are working on will contain this stuff.

Code:
activated:
                  goto hi;
                  Return;
hi:
                  PlaySoundThing(mysound, GetLocalPlayerThing(), 1.0, -1, -1, 128);
                  Return;
end
Admin of Narshaddaa.net's dedicated server. For more information on about the dedicated server: http://jkdf2.net/
2005-12-05, 2:45 PM #3
Continue is a keyword used inside a loop. Break (a similar keyword) and continue are partially implemented in JK (as far as I know), but they only work in MotS.

What problem does Parsec have with custom messages?
Historians are the most powerful and dangerous members of any society. They must be watched carefully... They can spoil everything. - Nikita Khrushchev.
Kill one man, and you are a murderer. Kill millions of men, and you are a conqueror. Kill them all, and you are a god. - Jean Rostand.
2005-12-05, 4:20 PM #4
There error was just 'custom message found on line ...."

Dunno, I really dont use parsec. I was just trying to see if it was familiar with the keywords: continue or goto.
Admin of Narshaddaa.net's dedicated server. For more information on about the dedicated server: http://jkdf2.net/
2005-12-05, 4:22 PM #5
Generally I don't think it's a good idea to use any common C/C++ keywords as variable names, if only for readability's sake.
Dreams of a dreamer from afar to a fardreamer.

↑ Up to the top!