I have 2 types of people, some that are in a city and some that are out in the battlefield.
This helps the battle go smoothly because there are less type instances to worry about when calculating the closest enemy etc.
I need to copy the info from a city person into another type called warrior person when they leave the city and join the battle.
I tried this:
the error message ['illegal type conversion'] happens at
the call to the create_warrior(s) function
Why doesnt this work? and what is the best way to create a copy of a type?
This helps the battle go smoothly because there are less type instances to worry about when calculating the closest enemy etc.
I need to copy the info from a city person into another type called warrior person when they leave the city and join the battle.
I tried this:
positionentity s\handle,0,0,0 create_warrior(s) function create_warrior(s) w.warrior=new warrior w\handle=s\handle end function
the error message ['illegal type conversion'] happens at
the call to the create_warrior(s) function
Why doesnt this work? and what is the best way to create a copy of a type?