Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, AndrewAMD), 14,749 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: help for reading function and action from text file [Re: Tonyjack221] #403053
06/13/12 19:36
06/13/12 19:36
Joined: Jun 2011
Posts: 75
algeria
T
Tonyjack221 Offline OP
Junior Member
Tonyjack221  Offline OP
Junior Member
T

Joined: Jun 2011
Posts: 75
algeria
But it did not work

Re: help for reading function and action from text file [Re: Tonyjack221] #403055
06/13/12 19:56
06/13/12 19:56
Joined: May 2008
Posts: 257
D
djfeeler Offline
Member
djfeeler  Offline
Member
D

Joined: May 2008
Posts: 257
hello,

I want help you :

a function I made ^^ :

Code:
// read data in file by djfeeler

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


STRING* F_read_file(STRING* Ent_file,STRING* Ent_name_found)
{
	STRING* LV_str_return = "";
	
	var LV_file_found = file_open_read(Ent_file);
	if(LV_file_found!=0)
	{
		if(file_find(LV_file_found,Ent_name_found)>0)
		{
			file_str_read(LV_file_found,LV_str_return);
		}
		file_close(LV_file_found);	
	}
	
	return LV_str_return;
}


function main()
{
	error(F_read_file("text.txt","START"));
}



in File text.txt write : START help

The word help will display

djfeeler

Re: help for reading function and action from text file [Re: djfeeler] #403058
06/13/12 20:27
06/13/12 20:27
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
FoxHound Offline
Expert
FoxHound  Offline
Expert

Joined: Jun 2004
Posts: 2,234
Wisconsin USA
I read the manual a bit better. Apparently in lite-c it can only be used to address Engine variables.

For lite-c do this

var_for_name("camera.clip_far = 20000");


---------------------
There is no signature here.


QUIT LOOKING FOR ONE!
Re: help for reading function and action from text file [Re: FoxHound] #403064
06/13/12 23:35
06/13/12 23:35
Joined: Jun 2011
Posts: 75
algeria
T
Tonyjack221 Offline OP
Junior Member
Tonyjack221  Offline OP
Junior Member
T

Joined: Jun 2011
Posts: 75
algeria
doesn't work

look i want to Load codes "lite_c" from a text file like "sys_exit(NULL)"
examples the User write in the text file:
-------------
sys_exit(NULL)
------------
or anything from lite_c
the game Read the text and apply
I think you understand now

Re: help for reading function and action from text file [Re: Tonyjack221] #403094
06/14/12 10:54
06/14/12 10:54
Joined: Jun 2011
Posts: 75
algeria
T
Tonyjack221 Offline OP
Junior Member
Tonyjack221  Offline OP
Junior Member
T

Joined: Jun 2011
Posts: 75
algeria
???

Re: help for reading function and action from text file [Re: Tonyjack221] #403095
06/14/12 11:01
06/14/12 11:01
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
for hardcoded variables and engine variables, you can readout the syntax linea from the txt file, ask for string values with str_stri and with str_trunc/clip/to_num, you can "run" the functions.


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Page 2 of 2 1 2

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