|
|
another error, trying to call function with vector
#109962
01/30/07 04:59
01/30/07 04:59
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Quote:
Error in 'MAIN' line 86: machine code generator:can not push STRUCT@16
< crumple(one,two,sports,dead); >
one is a VECTOR, two is an array, sports and dead are entity pointers.
what does the error mean? i know i ask a lot of questions with lite-C, but i can't figure out what's wrong. this worked with normal a6 extra (latest version) and now i'm converting it to lite-C to try it out. i've gone through some problems, found the appropriate fixes, but i don't understand this.
this error quoted above appears in the compiler loading screen but for once there is no warning message or error message, the game just loads. i had to use print screen to catch that warning and copy it. then, when the function is called it freezes for a sec, doesn't slow the rest of my computer down at all, and then does one of those "program encountered a problem and needs to close" messages.
any ideas? what does the warning mean?
thanks,
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: another error, trying to call function with vector
[Re: JibbSmart]
#109963
01/30/07 10:37
01/30/07 10:37
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Could you post the code of the function cumple() as well?
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: another error, trying to call function with ve
[Re: Thomas_Nitschke]
#109964
01/30/07 10:46
01/30/07 10:46
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
Code:
function crumple(VECTOR hitPoint,var* hitStrength,ENTITY* clean,ENTITY* crashed)
the error says its on line 86, where it calls the function, so i think this is all u need. i hope u understand if i dont want to show its contents, its for an important project im working on. the rest shouldnt affect this error -- additionally, when i go to debug mode (breakpoints), it crashes on the function call, it doesn't get inside the function. thanks Matrix and anyone else who can help, julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: another error, trying to call function with ve
[Re: JibbSmart]
#109965
01/30/07 10:56
01/30/07 10:56
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
Yeah, supposedly so: I'd bet the problem is you cannot pass an array when, in the function definition, it says "var* hitStrength". I'm no professional as I'm still learning C/C++, but that doesn't seem compatible to me.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: another error, trying to call function with ve
[Re: Thomas_Nitschke]
#109966
01/30/07 11:00
01/30/07 11:00
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
the lite-C manual says that's the way to do it, i'm afraid.
i appreciate your help a lot!
goodnight, hopefully i'll find some answers tomorrow arvo!
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: another error, trying to call function with ve
[Re: JibbSmart]
#109967
01/30/07 13:20
01/30/07 13:20
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
Post more code, including how your using the function and what happens to the paramters afterwards.
However one idea that comes to mind is you are using a Var vector and passing it off as a vector vector. And that is as bad as that time my mom found out it wasn't the neighbor's dog killing our kittens, it was me.
Last edited by FoxHound; 01/30/07 13:24.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Re: another error, trying to call function with ve
[Re: FoxHound]
#109968
01/30/07 15:24
01/30/07 15:24
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
How about using Code:
var[] * hitStrength
in the function definition instead? Just guessing...
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: another error, trying to call function with ve
[Re: jcl]
#109970
01/31/07 05:07
01/31/07 05:07
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
OP
Expert
|
OP
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
whoops, thank you! it works now  julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|