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 dont want to work?
Cog dont want to work?
2002-12-05, 5:34 AM #1
Whats Wrong here? That cog wont work:|

Code:
#Jedi Knight Cog Script
#
# offline.cog
#
# [EH_AceCSF] 5/12/2002
#
# This COG is NOT supported by LucasArts Entertainment Company

symbols

message      activated                                                        
sound        alarm=00alarmloop01.wav     
surface      offline                            linkid=1                      

end                                                                           

# ================================================================================
activated :

if ((GetSenderID() == 1)
PlaySoundLocal(alarm, 1, 0, 0);
Print("its offline");
return;
end


[Edit: Please, Im begging you, use code tags!]

[This message has been edited by GBK (edited December 05, 2002).]
2002-12-05, 7:18 AM #2
Your problem is simple, and its in bold below. My guess is, you cut-and-pasted a bunch of cogs together . . . dont do that, it rarely works.

Code:
#Jedi Knight Cog Script
#
# offline.cog
#
# [EH_AceCSF] 5/12/2002
#
# This COG is NOT supported by LucasArts Entertainment Company

symbols

message      activated                                                        
sound        alarm=00alarmloop01.wav     
surface      offline                            linkid=1                      

end                                                                           

# ================================================================================
activated :

if (GetSenderID() == 1) {
PlaySoundLocal(alarm, 1, 0, 0);
Print("its offline"); }
return;
end



You had one too many brackets at the beggining of the conditional statement. Remember, one at the beggining, one at the end.... But in truth, since there is only one object defined, you dont even need a conditional statement.


Oh, yeah, PARSEC would have caught that error.

[This message has been edited by GBK (edited December 05, 2002).]
And when the moment is right, I'm gonna fly a kite.
2002-12-05, 8:10 AM #3
thx for help

PARSEC ??

↑ Up to the top!