Hi,

Thanks for your quick reply. I get an erro E1340 saying "not enough entities reserved (x)". As soon as I click Ok or click away the message, the game/editor crashes.

This the ent_create code I am now testing it with:
Code:
function button_create_ent(var buttonnumber, PANEL* p_panelofbutton)
{
  ...  
  you = ent_create(select_filename_str, target_pos_vec, new_selection);			
}



The action (new_selection) is not run as it should (checked it with error("test");) so that could not be it. And 'you' is not used in other global function before it is made NULL and e.g. filled with next_next again.

Setting warn_level = 0; also does not help.

But most importantly, I also get the error with a new dummy script. Maybe people could try the code beneath and check if it crashes or not when clicking 'ok':
Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>

///////////////////////////////


function main()
{
  vec_set(screen_size,vector(1000,600,0));
  wait(1);
  video_window(NULL, NULL, 4+16+32+64+128, "my game");
  
  vec_set(sky_color,vector(150,90,90)); // dark blue
  vec_fill(sun_color.blue, 225); 
  d3d_antialias = 9;
  shadow_stencil = 3;
  
  max_entities = 1;
  level_load(NULL);

  ent_create(NULL, nullvector, NULL);
  ent_create(NULL, nullvector, NULL);
  
}


Last edited by Reconnoiter; 07/27/15 13:59.