Lattice custom + basis command for binary alloy

Dear Lammps Users:

I run into a problem while creating NiTi lattice using lattice custom and basis command. I get the error message:

"ERROR: Invalid basis setting in create_atoms command (…/create_atoms.cpp:124)
Last command: create_atoms 2 box basis 1 2 basis 2 1 basis 3 2 basis 4 2 "

When I refer to the document, this error is often caused by the total number of atom types. But I created 2 types of atoms which i think is enough.
Could you help me to take a look at my lammps input file and advise me where I make the mistakes?

Dear Lammps Users:

I run into a problem while creating NiTi lattice using lattice custom and
basis command. I get the error message:

"ERROR: Invalid basis setting in create_atoms command
(../create_atoms.cpp:124)
Last command: create_atoms 2 box basis 1 2 basis 2 1 basis 3 2 basis 4 2 "

When I refer to the document, this error is often caused by the total number
of atom types. But I created 2 types of atoms which i think is enough.
Could you help me to take a look at my lammps input file and advise me where
I make the mistakes?

perhaps you are using a version of LAMMPS that is not compatible with
the documentation that you are looking at.
this same input below works for me:

LAMMPS (30 Mar 2018)
  using 1 OpenMP thread(s) per MPI task
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array

#------------Define variable------------------------
#variable a equal 4.646
#variable b equal 4.108
#variable c equal 2.898

# ---------- Define NiTi lattice---------------------

lattice custom 1.0 origin 0.0 0.0 0.0 a1 4.646 0.0 0.0 a2 0 4.108 0.0
a3 -0.392 0.0 2.871 basis 0.675 0.250 0.037 basis 0.325 0.750 0.963
basis 0.216 0.250 0.418 basis 0.784 0.750 0.582
Lattice spacing in x,y,z = 5.038 4.108 2.871
#orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

#------------------Create NiTi --------------

#region parameters calculated based on session 6.12 on page
http://lammps.sandia.gov/doc/Section_howto.html#howto-12

region simbox prism 0 4.646 0 4.108 0 2.8713 0. -0.3923
0. units lattice

create_box 2 simbox
Created triclinic box = (0 0 0) to (23.4065 16.8757 8.2435) with tilt
(0 -1.97641 0)
  1 by 1 by 1 MPI processor grid
create_atoms 2 box basis 1 2 basis 2 1 basis 3 2 basis 4 2
Created 220 atoms
  Time spent = 0.000742197 secs

Total wall time: 0:00:00

Dear Axel,

Thank you so much for solving this problem for me!
I will recompile the latest lammps and try the code again!

Best,
Chen