You have been left with the crankshaft pulley knife, and this is a huge whore.
The fault light was lit because the collector who goes in the tooth wheel sent incorrect information about the engine position (logical because the pulley does not rotate synchronized with the crankshaft because the chavetero is broken).
Now, you have to disassemble that pulley and examine in what state the sticker's tip has remained, since if the crankshaft is fine and only the key was broken, because another new one already puts run.
If the key and throat were broken on the pulley, then ... it is a bit more expensive because you have to change the two things but ... well
now, if the key was broken and the tip of the crankshaft was broken, the engine must be removed, disassemble the crankshaft of the bench and connecting rods and proceed to replace or repair it. Or make the decision to put another engine, drain, or exchange or ...
there is also the option to remove the gearbox, the torque converter, and with the engine still in the car to disassemble the crankshaft and perform the repair.
In either case, I really hope that this does not happen to you because your pocket will notice.
Greetings and will you tell us something ok?