Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 1,390 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
we having trouble on the struct #239399
12/04/08 14:39
12/04/08 14:39
Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
Azrael85 Offline OP
Newbie
Azrael85  Offline OP
Newbie

Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
at the attention of conitec i would like to know how i can make work this
Code:
typedef struct
{
	ENTITY* character;
	STRING* sentence_content;
	STRING* oggFile;
} sentence;


typedef struct dialogue
{
	STRING* dialogueName;
	int sentenceCount;
	struct sentence* sentenceArray;
} dialogue;

i need a solution for this, we are working on a product and we're stuck in this problem that should not exist
our production is slowing down because of this and after i had buy the gamestudio a7 pro i don't know neither how i can use the mail support, please answer me even in private.
thanks.

Re: we having trouble on the struct [Re: Azrael85] #239411
12/04/08 15:38
12/04/08 15:38
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Code:
typedef struct
{
	ENTITY* character;
	STRING* sentence_content;
	STRING* oggFile;
} sentence;


typedef struct dialogue
{
	STRING* dialogueName;
	int sentenceCount;
	sentence sentenceArray;
} dialogue;


void main(){
	dialogue* d1 = malloc(sizeof(dialogue));	
	d1.sentenceArray.sentence_content = "lol";
	
	printf("%s",d1.sentenceArray.sentence_content);
	
}


this is working well. Hope this helps.

Last edited by Quadraxas; 12/04/08 15:39.

3333333333
Re: we having trouble on the struct [Re: Quad] #239428
12/04/08 16:29
12/04/08 16:29
Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
Azrael85 Offline OP
Newbie
Azrael85  Offline OP
Newbie

Joined: Jul 2008
Posts: 27
Italy, Sicilia, Palermo
thanks seems to work well laugh

Re: we having trouble on the struct [Re: Azrael85] #239436
12/04/08 16:54
12/04/08 16:54
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
make sure you free allocated memory or you'll end up with "i dont see anything but mah game uzez 1gb ram."

and again make sure you dont try to use free d memory or youll endup with crashes.

good to hear that it worked.

Last edited by Quadraxas; 12/04/08 16:54.

3333333333

Moderated by  old_bill, Tobias 

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