Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 177 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 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 | 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