Posted By: MMike
Crash on txt_create - 07/14/10 01:27
Hello this is my code..
Whats wrong? because i assign apointer to the text, and then when i try to move it.. it crashes..
Whats wrong? because i assign apointer to the text, and then when i try to move it.. it crashes..
Code:
#include <acknex.h>
#include <default.c>
#include <litec.h>
TEXT* txt1;
STRING* txt1_content="alternative";
function load_text(TEXT* a, STRING* b){
a=txt_create(1,2);
(a.pstring)[0]=b;
set(a,SHOW);
}
function main(){
vec_set(screen_color,vector(53,53,53));
video_window(NULL,NULL,16,"TEST");
video_set(800,600,0,0);
level_load(NULL);
wait(1);
reset(camera,SHOW);
load_text(txt1,"Hellllo");
wait(-5);
//move the texto to right
txt1.pos_x=200;
}