Quote:


I am assuming the array only holds a pointer to the game_time string instead of a copy of the actual string





Arrays I think only hold numbers (vars) and not strings directly, so it would be a pointer to a string that it would be holding.

Maybe try

p_time_of_action[currentPatient * p_num_of_actions[currentPatient]] = str_create(game_time);

I am not fully understanding the problem (thats my fault - I am a little sleepy ) - so I am not sure whether this is the right answer or not

Somehow copy the contents of "game_time" into a new string and then use the new string so the array value is no longer pointing to game_time...

Thanks,
Adoado


Visit our development blog: http://yellloh.com