You cant set strings in a struct using = but you can use str_cpy,
as long as you use str_create first, but only from inside a function.


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

typedef struct PEINT {
	var 	toucher ; // touched 
	var 	bon_rep ; // good answer
	var 	mau_rep ; // bad answer 
	var 	jeu ;     // game
	char slettre[2];
	STRING* s_mi;
} PEINT; 

// ----------------- definitions 
PEINT* STmi = {toucher = 4; bon_rep = 3; mau_rep = 5; jeu=21; slettre = "bx"; s_mi = NULL;}  //dont bother with 's_mi' yet

//------------------ panel

PANEL* p_resultats = {
	pos_x = 0; 		
	pos_y = 0;
	layer 900;
	digits (10,100," jeu no: %.0f ",*,1,STmi.jeu);
	digits (350, 100, "toucher = %.0f",*,1,STmi.toucher);
	digits (550,100,"bonne rp: %.0f ",*,1,STmi.bon_rep);
	digits (650,100,"mau choix: %.0f ",*,1,STmi.mau_rep);
	
	digits (300,130,"value of STmi.lettre: %s ",*,1,STmi.slettre);
	digits (300,160,"value of STmi.s_mi: %s ",*,1,STmi.s_mi);

	flags = OVERLAY  ; 
}

function give_new_val ()
{
	while (STmi == NULL) { wait (1);	}
	p_resultats.flags |= VISIBLE;
	// change the values to
	STmi.toucher = 14;
	STmi.bon_rep = 13;
	STmi.mau_rep = 15;
	STmi.jeu = 222;
	STmi.slettre = "by";           
	str_cpy(STmi.s_mi, "mmmm");    //This should work - but also look at main
}

function main()
{
	video_set(800,600,32,1);  
	screen_color.blue = 255;
	level_load(""); 
	wait(2);
	STmi.s_mi = str_create("something");    //This will make "give_new_val" work
        wait(-5);                               //wait a few seconds before running give_new_val
	give_new_val ();
}
//



"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial