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 crashes the game, and parsec shows no errors
cog crashes the game, and parsec shows no errors
2003-08-10, 8:00 AM #1
the cog crashes the game, but parsec shows no errors, and i cant see the problem.
Code:
# Jedi Knight Cog Script
#
# pjb_crate.cog
#
# a cog to move a crate though sever positons, convayer belts and one elivatior.
# 
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols
template     cre1                                                             
template     cre2                                                             
thing        start                                                            
message      startup                                                          
surface      conv1                                                            
thing        elivatior                                                        
vector       vec                                                              
int          box=-1                             local                         
vector       svec                               local                         
int          poo=0                              local                         
int          newbox=-1                          local                         
message      arrived                                                          
end                                                                           
# ========================================================================================
code
startup:
svec=VectorSet(0,0,0); 
create:
if(poo==0)
{
newbox=CreateThing(cre1,start);
CaptureThing(newbox);
MoveToFrame(newbox,0,4);
}
if(poo==1)
{
newbox=CreateThing(cre2,start);
CaptureThing(newbox);
MoveToFrame(newbox,0,4);
}
return;
arrived:
box=GetSenderRef(); 
movetoframe(box,1,10);
if(GetCurFrame(box) == 1)
{
MoveToFrame(box,2,4);
slideSurface(conv1, vec, 4); 
}
else if (GetCurFrame(box) == 2)
{
MoveToFrame(box,3,4);
slideSurface(conv1, svec, 4); 
MoveToFrame(elivatior,0,4);
}
else if (GetCurFrame(box) == 3)
{
MoveToFrame(box,4,4);
MoveToFrame(elivatior,1,4);
}
else if (GetCurFrame(box) == 4)
{
MoveToFrame(box,5,4);
}
else if (GetCurFrame(box) == 5)
{
MoveToFrame(box,6,4);
}
else if (GetCurFrame(box) == 6)
{
MoveToFrame(box,7,4);
}
else if (GetCurFrame(box) == 7)
{
DestroyThing(box);
if(poo==0) poo=1;
else if(poo==1) poo=0;
call create;
}
return;
end
# ........................................................................................


------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-08-10, 8:53 AM #2
So far, I can't see a thing because of that there are no indents...
The only thing I can say is:
Is it the COG that crashes the game, or is it the 3DO?
Edward's Cognative Hazards
2003-08-12, 2:53 PM #3
There's a slight chance that "create" may be causing a problem - it's very similar to "created". Maybe try "make" instead. I'm not saying that's definitely the problem, though.

------------------
"The Just shall live by faith." - Galatians 3:11
To edit is human... To COG is divine!!

pegasus_1984: Stop bushing that dang suck button.
guitarofgold: NOOOOOOOOO!!!!
-------[end post]-------
Catloaf, meet mouseloaf.
My music
2003-08-13, 2:48 AM #4
Quote:
<font face="Verdana, Arial" size="2"> "create" may be causing a problem - it's very similar to "created".</font>


Whether it's similar or not, it doesn't matter - as long as 'create' does not equal a message name, then JK will treat it as any custom message. In fact, even if created was used, the message call would still have worked.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-13, 6:55 AM #5
now on activate and activated... I think both work, but I forget....

------------------
The Sniper Missions. Current project, The Sniper Missions

The Magician Saber System.

The 2 riddle!
Major projects working on:
SATNRT, JK Pistol Mod, Aliens TC, Firearms

Completed
Judgement Day (HLP), My level pack
2003-08-13, 5:20 PM #6
Don't be confused by activate / activated - they are both the same message and are explicitly listed in the exe.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
2003-08-15, 10:07 AM #7
its the cog.
i took it out and it was fine
put it in and it crashed the game

i used LEC items templates and 3do's

could it be changing the camra/player?

------------------
I am pjb.
Another post......
another moment of my life wasted.....
at least i made a level.
PJB's JK page's

-the PJB jedi rule book-
rule one, "never trust a bartender with bad grammar"-kyle katarn in JO

Rule Two, "Gravity is a crule misstress" -kyle katarn in MotS, and the alternatior MK I in AJTD

rule three, "asprines good, but it hasent got the kick of morphine. and its not gonna stop the hurting in my arm, the ones thats on the otherside of the room i mean" -the alternatior
I am Darth PJB!
well, go on, run away!

i have a plastic lightsaber and a jedi cape.. am i a nerd?

If gravity is a crule mistress, and bar tenders with bad grammar are untrustworthy, what is air?
2003-08-15, 10:21 AM #8
I dont see any camera changes in this cog. I cant see why it would be crashing but maybe try to add a few checks before you -

destroything(box);

like

if(box > 0 && GetThingType(box) != 10 && GetLifeLeft(box) != 0)
{
ReleaseThing(box);
DestroyThing(box);
}

------------------
- Wisdom is 99% experience, 1% knowledge. -


[This message has been edited by The_New_Guy (edited August 15, 2003).]
- Wisdom is 99% experience, 1% knowledge. -
2003-08-15, 2:37 PM #9
After looking through the cog...

Don't give variables names like 'poo'. Choose a name that means something, not just whatever vulgar thing that comes to mind. Also, don't misspell variables. If you have an elevator call it that.

Your MoveToFrame() code looks all wrong. You need to read up on that command and frame movement in general. If you had a print in the arrived message that told you the current frame, then you'd already have realized.

What's probably crashing is the DestroyThing() command as New_Guy pointed out. But get your arrived code right, and you should not have problems there.

------------------
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.
Author of the JK DataMaster, Parsec, Scribe, and the EditPlus Cog Files.

↑ Up to the top!