Hello everybody,

the function ent_create(STRING* filename, VECTOR* position, function); is used to create an entity and immediately assign a function to that newly created entity.
I would like to pass over values to the function that is assigned to the new entity. To do this I tried the following code:

Code:
// The basic includes
#include <acknex.h>
#include <default.c>

// List of functions
function create_scaled_entity(X_Scale, Y_Scale);
function main();

function create_scaled_entity(X_Scale, Y_Scale)
{
	my.scale_x = X_Scale;
	my.scale_y = Y_Scale;
}

function main()
{
	level_load(NULL);
	camera.tilt= -90;
	camera.z = 3000;
	
	ent_create("Test.mdl", nullvector, create_scaled_entity(5, 5));
}



This is pretty straight forward. The "main" function creates an entity via ent_create and assigns the function "create_scaled_entity" to this newly created entity.
This works until I try to pass over parameters to the new entity in the same line that creates it.
The engine crashes and returns an E1513 "Crash in ..." (mostly it is an empty-pointer-error).

Am I doing something wrong or is this not possible? If so, is there a workaround?
I don't really understand why this returns a pointer-error.

Thank you for taking a look at this.

Have a good start in the day.