Toad generates an invalid DDL script for a table that has foreign key constraint and resides in other that the default "dbo" schema.
Take the following two tables:
CREATE TABLE err.table_a (id INT PRIMARY KEY);
CREATE TABLE err.table_b(
id INT, a_id INT CONSTRAINT fk_tablea FOREIGN KEY REFERENCES err.table_a(id));
Then use the table details viewer, script tab to preview the generated code. It doesn't include the schema name in from of the referenced table.
Pay attention to that "Schema qualify" option is checked and works for the table name.
Strangely enough, the code is fine, when you click the "Generate a creation script" button.