Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, The_Judge, Grant), 898 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

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 Offline
Expert
FoxHound  Offline
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
T
Thomas_Nitschke Offline
Senior Developer
Thomas_Nitschke  Offline
Senior Developer
T

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: Thomas_Nitschke] #109969
01/30/07 15:29
01/30/07 15:29
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
When defining a function, you must pass a VECTOR* instead of a VECTOR as argument.

In C-Script, it was function (&var).

In lite-C / C /C++, it's function (var*).

http://manual.conitec.net/structs.htm



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
J
JibbSmart Offline OP
Expert
JibbSmart  Offline OP
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
whoops, thank you! it works now

julz


Formerly known as JulzMighty.
I made KarBOOM!

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1