Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, Quad, AndrewAMD), 936 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 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