Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (wandaluciaia, AndrewAMD, 1 invisible), 765 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 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