Fatal error: Cannot redeclare: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with "so, you tried to install a mod and now you see an error one one or more pages: Fatal error: Cannot redeclare.... This means that the mod has been installed (at least) twice. Th...")
 
No edit summary
Line 10: Line 10:


if you did not take a backup, you will have to manually parse the mod which is causing the error(s) and then go through each and every edit, making certain to remove any code which is duplicated. (Sometimes the code duplication is not a fatal error, it just duplicates a variable assignment, or the display code - but in all cases, duplicate code is bad.) Depending on the mod, this may be a time-consuming task... remember to take a backup before attempting to install a mod, next time.
if you did not take a backup, you will have to manually parse the mod which is causing the error(s) and then go through each and every edit, making certain to remove any code which is duplicated. (Sometimes the code duplication is not a fatal error, it just duplicates a variable assignment, or the display code - but in all cases, duplicate code is bad.) Depending on the mod, this may be a time-consuming task... remember to take a backup before attempting to install a mod, next time.
[[Category:FAQ]]

Revision as of 12:37, 24 August 2012

so, you tried to install a mod and now you see an error one one or more pages:

Fatal error: Cannot redeclare....

This means that the mod has been installed (at least) twice. The code has two copies of some function and it throws an error when it reaches the second copy and tries to tell the system to "know" the name of the function.

What can you do?

If you took a backup before you installed the mod, then you are all set! Restore the backup and move on.

if you did not take a backup, you will have to manually parse the mod which is causing the error(s) and then go through each and every edit, making certain to remove any code which is duplicated. (Sometimes the code duplication is not a fatal error, it just duplicates a variable assignment, or the display code - but in all cases, duplicate code is bad.) Depending on the mod, this may be a time-consuming task... remember to take a backup before attempting to install a mod, next time.



Advertisement: