Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Edgar_Herrera, VoroneTZ, Akow), 973 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: New way to load map [Re: Ch40zzC0d3r] #439540
04/04/14 14:26
04/04/14 14:26
Joined: Nov 2013
Posts: 47
S
SkullBoy99 Offline OP
Newbie
SkullBoy99  Offline OP
Newbie
S

Joined: Nov 2013
Posts: 47
Ok, but that's not my problem.It can't read a string from my file.

Re: New way to load map [Re: SkullBoy99] #439548
04/04/14 17:14
04/04/14 17:14
Joined: Sep 2009
Posts: 991
Budapest
Aku_Aku Offline
User
Aku_Aku  Offline
User

Joined: Sep 2009
Posts: 991
Budapest
This community at all helpful. We will help you, if you give respect to the forum rules when ask something.
Use the code formatting option, that you can see when you write your post next above the textbox where you type in your message.
Click on the icon with # mark, after select the [code] option and insert your code between the starting-ending tag.
Moreover, that is not enough if you give a sign, you have a problem. You have to describe the issue as detailed as can, have to give the errorcode if that appeared, have to give the circumstances that where the error raised, have to give your action that triggered the error. And so on...
If you interested in this subject generally, here is a link: How to ask questions

Re: New way to load map [Re: Ch40zzC0d3r] #439638
04/06/14 12:34
04/06/14 12:34
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
mdl_name is just a string pointer.
You need str_create() as file_str_read() will not create the string for you, but just copy into it. So at the moment you're reading to anywhere, but surely not to a string.

Code:
STRING* mdl_name = str_create("");
(...)
file_str_read(fhandle, mdl_name);
(...)


Re: New way to load map [Re: FBL] #439714
04/07/14 20:34
04/07/14 20:34
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
you can also do this if you have in file (map.txt ) ex:

Code:
///    name  x   y  z
 model: zombi.mdl 123 15 33
 model: zombi2.mdl 55 40 33




this is the script for read this file


Code:
function read_info()
{
	var handle_map = file_open_read ("map.txt");
		
	while(file_find (handle_map,"model:"))	
	{
		STRING* name ="               ";
		file_str_read(handle_map,name);
		my = ent_create(name,vector(0,0,0),NULL);
		my.x = file_var_read(handle_map);// read first number
		my.y = file_var_read(handle_map);// read second number		
		my.z = file_var_read(handle_map);// read third number			
		wait(1);
	}
	//if you pass here that mean you read all "model:" string  in file map.txt
        file_close(handle_map); // now close handle_map
}






Last edited by Dico; 04/07/14 20:36.
Re: New way to load map [Re: Dico] #439817
04/10/14 13:43
04/10/14 13:43
Joined: Jul 2013
Posts: 158
F
Feindbild Offline
Member
Feindbild  Offline
Member
F

Joined: Jul 2013
Posts: 158
Wtf. Why would you even want to do this?
3 pages and yet no one explained why they would want to do something like this.
What are the advantages? Why use text files??

Re: New way to load map [Re: Feindbild] #439821
04/10/14 15:47
04/10/14 15:47
Joined: Feb 2012
Posts: 371
Dico Offline
Senior Member
Dico  Offline
Senior Member

Joined: Feb 2012
Posts: 371
maybe he want to create his own world editor !!

Re: New way to load map [Re: Dico] #439823
04/10/14 16:00
04/10/14 16:00
Joined: Jul 2013
Posts: 158
F
Feindbild Offline
Member
Feindbild  Offline
Member
F

Joined: Jul 2013
Posts: 158
Yea... but why text files?!

Re: New way to load map [Re: Feindbild] #439824
04/10/14 16:02
04/10/14 16:02
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
Because they are easier to debug (human readable).
Imho it's good to develop a file format in text format and then just port this to binary.


Visit my site: www.masterq32.de
Re: New way to load map [Re: MasterQ32] #440169
04/19/14 15:19
04/19/14 15:19
Joined: Nov 2013
Posts: 47
S
SkullBoy99 Offline OP
Newbie
SkullBoy99  Offline OP
Newbie
S

Joined: Nov 2013
Posts: 47
Yeah.. and when you want to build(compile) map ,you don't need to wait only few seconds
Dico thank you very much!That's that i want laugh (a .ipl is a .txt file but renamed)

Re: New way to load map [Re: SkullBoy99] #444168
08/01/14 09:33
08/01/14 09:33
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline
Newbie
AceX  Offline
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
I think it's time to work on this world editor grin
Give me some ideas if you want,everything .

Page 3 of 3 1 2 3

Moderated by  aztec, Spirit 

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