Hello,
I am having some trouble with the code below. Error returned is:
Could not determine parameter type of 'objects_in_game(y).model_name' at line 162.
code:
type objects_g
model_name as string
model_h as string
model_h_id as integer
model_l as string
model_l_id as integer
endtype
dim static_objects_on_screen(-1) as staticobject
dim dynamic_objects_on_screen(-1) as dynamicobject
dim players_on_screen(-1) as player
dim pets_on_screen(-1) as pet
dim free_object_id(-1)
dim objects_in_game(0) as objects_g
function add_object(model as string,x as double integer,y as double integer, z as double integer, angle as integer, action as integer)
` this function adds a object to the screen, this can be both a dynamic as a static object (later to the terrain), so the clients computer knows where it is
` the function will return a assigned id
` all models are loaded on startup, so we are sure the model is already there
` default id, if this hasnt changed at the end of the function, something went wrong
new_object_id = 0
`now its time to add the object, first we need to know the real object id
array_count = array count(objects_in_game())
for y=0 to array_count
` loop through the array
` find the modelname
ERROR LINE if objects_in_game(y).model_name = model ` ERROR LINE
` object found
new_object_id = find_free_id()
model_l_id = objects_in_game(y).model_l_id
model_h_id = objects_in_game(y).model_h_id
Error is returned by Synergy, on compiling
Microsoft isnt evil, they just make really crappy operating systems -- Linus torvalds