Quote:
Originally Posted by Rexonspix
Now I get the error: "Must be assigned to an array" on the code:
Code:
rank[255] = jobPoliceRank[1];
|
Quote:
Originally Posted by Arkshine
- Use copy()
|
PHP Code:
//A little easier to read
new jobPoliceRank[][] =
{
"Officer",
"Detective",
"Sergeant",
"Lieutenant",
"Major",
"Inspector",
"Sheriff"
};
new szRank[ 11 ];
//the_rank_index should be 0 through 6. 0 = "Officer", 6 = "Sherriff"
copy( szRank , 10 , jobPoliceRank[ the_rank_index ] );
Show us what you are trying to do because you may not need to make a copy of the string, you can probably just use the original.
__________________