@Germaine I always put testingcheats on first, just in case.
To get the sim id #, this should work:
(As an example if the sim's name is Jingleheimer Schmidt)
Sims.get_sim_id_by_name Jingleheimer Schmidt
So a space between "_name" and "Jingleheimer". Also a space between "Jingleheimer" and "Schmidt".
If the name has spaces in it or hyphens or apostrophes, I have encountered problems. Like "John'ji-smi" or something like that.
EDIT: Oh, it doesn't have to be uppercase or lowercase for letters, either works. ;)