Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by clonman. 11/13/25 14:04
brokerCommand PLOT_HLINE parameters
by M_D. 11/13/25 10:42
ZorroGPT
by TipmyPip. 11/10/25 11:04
Training with the R bridge does not work
by frutza. 11/05/25 00:46
Zorro 2.70
by opm. 10/24/25 03:44
Alpaca Plugin v1.4.0
by TipmyPip. 10/20/25 18:04
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Grant, AndrewAMD, ozgur, Quad, TipmyPip), 29,980 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sheliepaley, Blueguy, blobplayintennis, someone2, NotEBspark
19177 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
using engine_getvarinfo #460450
07/01/16 10:39
07/01/16 10:39
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Hi, I'm struggling to get "engine_getvarinfo" to work.
What I want is the name of the variable, but the script gives me the name of the stuct and an empty char.

Code:
#include <acknex.h>
#include <default.c>


typedef struct
{
	var testvar;
}TESTSTRUCT;

TESTSTRUCT tStruct[4];
void test()
{
	char varname[33];
	char structname[33];
	long offset;
	
	long type = engine_getvarinfo(&tStruct[0].testvar,varname,structname,&offset);
	
	printf(varname);
	printf(structname);
}

void main()
{
	test();
}



Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: using engine_getvarinfo [Re: alibaba] #460454
07/01/16 13:06
07/01/16 13:06
Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
pararealist Offline
Senior Member
pararealist  Offline
Senior Member

Joined: Dec 2006
Posts: 434
UK,Terra, SolarSystem, Milky W...
"If the variable or struct is a pointer, engine_getvar returns a pointer to the pointer (see example)."

Would you not have to get the "var" first with engine_getvar() and then pass this to the engine_getvarinfo()?

Seems (to me) that this is what the above line in the manual suggests, but its been a long time since i used any of it.

Last edited by pararealist; 07/01/16 13:06.

A8.3x Commercial, AcknexWrapper and VS 2010 Express
&#9675;pararealist now.
Re: using engine_getvarinfo [Re: pararealist] #460544
07/03/16 17:43
07/03/16 17:43
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline OP
Expert
alibaba  Offline OP
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
I tried, but it didn't work


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de

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

Gamestudio download | 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