Posted By: FoxHound
How to tell if it is a development buid or release build - 10/26/15 17:26
I want to have some stuff show up in the development build that won't show up in the release build. I've searched the manual and so far no go.
STRING* str_hour=""; STRING* str_minute=""; STRING* str_mode=""; TEXT* txt_date_info = { layer = 1; pos_x = 50; pos_y = 10; string (str_month,str_day,str_year,str_hour,str_minute,str_mode); flags = CENTER_X | SHOW; } function get_date() { var file_handle=0; if(file_exists("date.txt")) { file_handle=file_open_read("date.txt"); var i=0; for(i=0;i<6;i++) { file_str_read(file_handle,(txt_date_info.pstring)[i]); } if(run_mode > 7) { str_cpy((txt_date_info.pstring)[5],"RELEASE,");} file_close(file_handle);} } function store_date() { if(run_mode>7) return; var file_handle=0; var dates[5]; dates[0]=sys_month; dates[1]= sys_day; dates[2]=sys_year; dates[3]=sys_hours; dates[4]=sys_minutes; beep(); file_handle=file_open_write("date.txt"); var i=0; for(i=0;i<5;i++) { str_for_num((txt_date_info.pstring)[i], dates[i]); str_cat((txt_date_info.pstring)[i],","); file_str_write(file_handle,(txt_date_info.pstring)[i]); } str_cpy((txt_date_info.pstring)[5],"DEVELOPMENT,"); file_str_write(file_handle,(txt_date_info.pstring)[5]); file_close(file_handle); get_date(); } function main() { vec_set(screen_size,vector(800,400,0)); vec_set(screen_color,vector(50,1,1)); // dark blue vec_set(sky_color,vector(50,1,1)); // dark blue video_window(NULL,NULL,0,"My New Game"); d3d_antialias = 1; shadow_stencil = 3; level_load(NULL); vec_set(camera.x,vector(-250,0,50)); vec_set(camera.pan,vector(0,-15,0)); wait(1); on_p=store_date; get_date(); }
STRING* str_show_v=""; TEXT={string(str_show_v);flags|= SHOW;} function main() { ...... str_for_num(str_show_v,version); }
var total=0; var years= sys_year-1970; var month=sys_months var day=sys_day; day=day*86400: month=month*2592000; year=year*31104000; total=(year+month+day)-file_date; // ERROR var to long // convert total back to hours or days total/=86400; //total should now be a var/fixed of days old the build is