It would be help to reproduce the error in your post.
Try this:
create exit ("my_new_exit", null, room, second_room, "northdirection")
Notes on the parameters:
mynewexit is a string, the name of the exit. It can be anything you like.
Instead of null for the second parameter, you could have a string here that is the alias of the exit, but it is rarely useful.
room is the location the exit will be in. This is an object, not a string, so no quotes, and if there is no location with this name you will get an error. When the exit is created, the "parent" attribute will get set to this (and you can use null here, and set the "parent" attribute later).
second_room is the location the exit will take the player to. It works just like the previous parameter, but with the "to" attribute.
northdirection is also a string, but has to be the name of an exit type. You can probably guess the alternatives.