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 → COG help needed
COG help needed
2001-02-08, 5:29 AM #1
ok,here is my cog,now something is incorrect,but what?
Quote:
<font face="Verdana, Arial" size="2"># Jedi Knight Cog Script
#
# inv1.COG
#
# [Lifeform]
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols

Sector green linkid=1
Sector red linkid=2
Sector gold linkid=3
surface plygre
surface plyred
surface plygol
thing player local
int num local

message entered


end

# ========================================================================================

code
Entered:
player = GetLocalPlayerThing();
if(GetSenderID() == 1);
{
SetPlayerTeam(player,1);
num = ((GetNumPlayersInTeam(1)) + 1);
SetWallCel(plygre,num);
}
if(GetSenderID() == 2);
{
SetPlayerTeam(player,2);
num = ((GetNumPlayersInTeam(2)) + 1);
SetWallCel(plyred,num);
}
if(GetSenderID() == 3);
{
SetPlayerTeam(player,3);
num = ((GetNumPlayersInTeam(3)) + 1);
SetWallCel(plygol,num);
}

Return;
end


</font>

Please help me


------------------
The path has been placed before you,
the choise is yours alone.
It will be a hard life,
but you will find out:
Who you are.
2001-02-08, 7:16 AM #2
Try taking out the semicolons after the "if" parts (e.g. change "if(GetSenderID() == 1);" to "if(GetSenderID() == 1)".
2001-02-08, 7:59 AM #3
Nope,it just messes up the cog...

------------------
The path has been placed before you,
the choise is yours alone.
It will be a hard life,
but you will find out:
Who you are.
2001-02-08, 8:01 AM #4
oppps beat me to it. [http://forums.massassi.net/html/wink.gif]

------------------
The only way to live a good life is to act on your emotions.

[This message has been edited by Lt_Greywolf (edited February 08, 2001).]
2001-02-08, 8:36 AM #5
Never, ever, end the first line of an IF with a semi colon. Example: IF on == 1 (good)
IF on == 1; (bad)

------------------
Together we stand.
Divided we fall.

↑ Up to the top!