You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by alincarpetman

Hop to:    
Welcome! You are not logged in. Please Login or Register.1 reply
Rise of Nations Heaven » Forums » Scenario Design » Corrupt Script Error
Bottom
Topic Subject:Corrupt Script Error
Styleline49
Member
posted 11-17-16 11:48 PM EDT (US)         
I'm no scripting expert, but I created a simple script for a scenario project I'm working on. Everything seems to check out until I load the script in game and the game crashes with a notification stating "Corrupt Script Error"
Any ideas as to what may be causing this problem?

scenario
{

labels {
//Add any constant labels here in a comma separated list.
}

run_once {
set_nation_name("British","Americans");
set_nation_name("Greeks","Americans");
set_nation_name("Lakota","Survivorss");
set_nation_name("Nubians","Survivors");
set_nation_name("Inca","US Army Remnants");
set_nation_name("Chinese","Chinese Remnants");
set_nation_name("Russians","Bostonians");
set_nation_name("Spanish","Institute");
disable_type_by_tribe("Citizen","British");
disable_type_by_tribe("Citizen","Greeks");
disable_type_by_tribe("Citizen","Spanish");
disable_all_unit_ai(0);
disable_all_unit_ai(3);

if (have_tech(4,"Despotism")){
enable_type_by_tribe("Vandals","Russians","Barracks",0,2);
enable_type_by_tribe("Solduri","Russians","Barracks",0,0);
enable_type_by_tribe("Barbarians","Russians","Barracks",0,1);
enable_type_by_tribe("Landsknechts","Russians","Barracks",0,3);
set_nation_name("Russians","Super Mutants");
}

if (have_tech(2,"Despotism")){
enable_type_by_tribe("Vandals","Nubians","Barracks",0,2);
enable_type_by_tribe("Solduri","Nubians","Barracks",0,0);
enable_type_by_tribe("Barbarians","Nubians","Barracks",0,1);
enable_type_by_tribe("Landsknechts","Nubianss","Barracks",0,3);
set_nation_name("Nubians","Super Mutants");
}

if (have_tech(1,"Despotism")){
enable_type_by_tribe("Vandals","Lakota","Barracks",0,2);
enable_type_by_tribe("Solduri","Lakota","Barracks",0,0);
enable_type_by_tribe("Barbarians","Lakota","Barracks",0,1);
enable_type_by_tribe("Landsknechts","Lakota","Barracks",0,3);
set_nation_name("Lakota","Super Mutants");
}

if (have_tech(7,"Despotism")){
enable_type_by_tribe("Vandals","Chinese","Barracks",0,2);
enable_type_by_tribe("Solduri","Chinese","Barracks",0,0);
enable_type_by_tribe("Barbarians","Chinese","Barracks",0,1);
enable_type_by_tribe("Landsknechts","Chinese","Barracks",0,3);
set_nation_name("Chinese","Super Mutants");
}

if (have_tech(5,"Despotism")){
enable_type_by_tribe("Vandals","Inca","Barracks",0,2);
enable_type_by_tribe("Solduri","Inca","Barracks",0,0);
enable_type_by_tribe("Barbarians","Inca","Barracks",0,1);
enable_type_by_tribe("Landsknechts","Inca","Barracks",0,3);
set_nation_name("Inca","Super Mutants");
}

if (have_tech(4,"Monarchy")){
enable_type_by_tribe("Gun Samuri","Russians","Barracks",0,2);
enable_type_by_tribe("Jaguar Assault Infantry","Russians","Barracks",0,0);
enable_type_by_tribe("Tercios","Russians","Barracks",0,1);
enable_type_by_tribe("Advisor Fouché","Russians","Barracks",0,3);
set_nation_name("Russians","Brotherhood of Steel");
}

if (have_tech(2,"Monarchy")){
enable_type_by_tribe("Gun Samuri","Nubians","Barracks",0,2);
enable_type_by_tribe("Jaguar Assault Infantry","Nubians","Barracks",0,0);
enable_type_by_tribe("Tercios","Nubians","Barracks",0,1);
enable_type_by_tribe("Advisor Fouché","Nubians","Barracks",0,3);
set_nation_name("Nubians","Brotherhood of Steel");
}

if (have_tech(1,"Monarchy")){
enable_type_by_tribe("Gun Samurai","Lakota","Barracks",0,2);
enable_type_by_tribe("Jaguar Assault Infantry","Lakota","Barracks",0,0);
enable_type_by_tribe("Tercios","Lakota","Barracks",0,1);
enable_type_by_tribe("Advisor Fouché","Lakota","Barracks",0,3);
set_nation_name("Lakota","Brotherhood of Steel");
}

if (have_tech(7,"Monarchy")){
enable_type_by_tribe("Gun Samurai","Chinese","Barracks",0,2);
enable_type_by_tribe("Jaguar Assault Infantry","Chinese","Barracks",0,0);
enable_type_by_tribe("Tercios","Chinese","Barracks",0,1);
enable_type_by_tribe("Advisor Fouché","Chinese","Barracks",0,3);
set_nation_name("Chinese","Brotherhood of Steel");
}

if (have_tech(5,"Monarchy")){
enable_type_by_tribe("Gun Samurai","Inca","Barracks",0,2);
enable_type_by_tribe("Jaguar Assault Infantry","Inca","Barracks",0,0);
enable_type_by_tribe("Tercios","Inca","Barracks",0,1);
enable_type_by_tribe("Advisor Fouché","Inca","Barracks",0,3);
set_nation_name("Inca","Brotherhood of Steel");
}

if (have_tech(4,"Socialism")){
enable_type_by_tribe("Arqimmortal","Russians","Barracks",0,2);
enable_type_by_tribe("Eagle Balamob Slingers","Russians","Barracks",0,0);
enable_type_by_tribe("Heavy Mohawk Spearmen","Russians","Barracks",0,1);
enable_type_by_tribe("Okwari","Russians","Barracks",0,3);
set_nation_name("Russians","Raiders");
}

if (have_tech(2,"Socialism")){
enable_type_by_tribe("Arqimmortal","Nubians","Barracks",0,2);
enable_type_by_tribe("Eagle Balamob Slingers","Nubians","Barracks",0,0);
enable_type_by_tribe("Heavy Mohawk Spearmen","Nubians","Barracks",0,1);
enable_type_by_tribe("Okwari","Nubianss","Barracks",0,3);
set_nation_name("Nubians","Raiders");
}

if (have_tech(1,"Socialism")){
enable_type_by_tribe("Arqimmortal","Lakota","Barracks",0,2);
enable_type_by_tribe("Eagle Balamob Slingers","Lakota","Barracks",0,0);
enable_type_by_tribe("Heavy Mohawk Spearmen","Lakota","Barracks",0,1);
enable_type_by_tribe("Okwari","Lakota","Barracks",0,3);
set_nation_name("Lakota","Raiders");
}

if (have_tech(7,"Socialism")){
enable_type_by_tribe("Arqimmortal","Chinese","Barracks",0,2);
enable_type_by_tribe("Eagle Balamob Slingers","Chinese","Barracks",0,0);
enable_type_by_tribe("Heavy Mohawk Spearmen","Chinese","Barracks",0,1);
enable_type_by_tribe("Okwari","Chinese","Barracks",0,3);
set_nation_name("Chinese","Raiders");
}

if (have_tech(5,"Socialism")){
enable_type_by_tribe("Arqimmortal","Inca","Barracks",0,2);
enable_type_by_tribe("Eagle Balamob Slingers","Inca","Barracks",0,0);
enable_type_by_tribe("Heavy Mohawk Spearmen","Inca","Barracks",0,1);
enable_type_by_tribe("Okwari","Inca","Barracks",0,3);
set_nation_name("Inca","Raiders");
}

if (have_tech(4,"Capitalism")){
enable_type_by_tribe("Recoiless Gun","Russians","Barracks",0,2);
enable_type_by_tribe("Guerilla Fighters","Russians","Barracks",0,0);
enable_type_by_tribe("Jaguar Infantry","Russians","Barracks",0,1);
enable_type_by_tribe("SAS","Russians","Barracks",0,3);
set_nation_name("Russians","Gunners");
}

if (have_tech(2,"Capitalism")){
enable_type_by_tribe("Recoiless Gun","Nubians","Barracks",0,2);
enable_type_by_tribe("Guerilla Fighters","Nubians","Barracks",0,0);
enable_type_by_tribe("Jaguar Infantry","Nubians","Barracks",0,1);
enable_type_by_tribe("SAS","Nubianss","Barracks",0,3);
set_nation_name("Nubians","Gunners");
}

if (have_tech(1,"Capitalism")){
enable_type_by_tribe("Recoiless Gun","Lakota","Barracks",0,2);
enable_type_by_tribe("Guerilla Fighters","Lakota","Barracks",0,0);
enable_type_by_tribe("Jaguar Infantry","Lakota","Barracks",0,1);
enable_type_by_tribe("SAS","Lakota","Barracks",0,3);
set_nation_name("Lakota","Gunners");
}

if (have_tech(7,"Capitalism")){
enable_type_by_tribe("Recoiless Gun","Chinese","Barracks",0,2);
enable_type_by_tribe("Guerilla Fighters","Chinese","Barracks",0,0);
enable_type_by_tribe("Jaguar Infantry","Chinese","Barracks",0,1);
enable_type_by_tribe("SAS","Chinese","Barracks",0,3);
set_nation_name("Chinese","Gunners");
}

if (have_tech(5,"Capitalism")){
enable_type_by_tribe("Recoiless Gun","Inca","Barracks",0,2);
enable_type_by_tribe("Guerilla Fighters","Inca","Barracks",0,0);
enable_type_by_tribe("Jaguar Infantry","Inca","Barracks",0,1);
enable_type_by_tribe("SAS","Inca","Barracks",0,3);
set_nation_name("Inca","Gunners");
}


if (have_tech(4,"Democracy")){
enable_type_by_tribe("Mortar","Russians","Barracks",0,2);
enable_type_by_tribe("Continental Marines","Russians","Barracks",0,0);
gain_upgrade(4,"Minuteman");
enable_type_by_tribe("General Blucher","Russians","Barracks",0,3);
set_nation_name("Russians","Commonwealth Minutemen");
}

if (have_tech(2,"Democracy")){
enable_type_by_tribe("Mortar","Nubians","Barracks",0,2);
enable_type_by_tribe("Continental Marines","Nubians","Barracks",0,0);
gain_upgrade(2,"Minuteman");
enable_type_by_tribe("General Blucher","Nubianss","Barracks",0,3);
set_nation_name("Nubians","Commonwealth Minutemen");
}

if (have_tech(1,"Democracy")){
enable_type_by_tribe("Mortar","Lakota","Barracks",0,2);
enable_type_by_tribe("Continental Marines","Lakota","Barracks",0,0);
gain_upgrade(1,"Minuteman");
enable_type_by_tribe("General Blucher","Lakota","Barracks",0,3);
set_nation_name("Lakota","Commonwealth Minutemen");
}

if (have_tech(7,"Democracy")){
enable_type_by_tribe("Mortar","Chinese","Barracks",0,2);
enable_type_by_tribe("Continental Marines","Chinese","Barracks",0,0);
gain_upgrade(7,"Minuteman");
enable_type_by_tribe("General Blucher","Chinese","Barracks",0,3);
set_nation_name("Chinese","Commonwealth Minutemen");
}

if (have_tech(5,"Democracy")){
enable_type_by_tribe("Mortar","Inca","Barracks",0,2);
enable_type_by_tribe("Continental Marines","Inca","Barracks",0,0);
gain_upgrade(5,"Minuteman");
enable_type_by_tribe("General Blucher","Inca","Barracks",0,3);
set_nation_name("Inca","Commonwealth Minutemen");
}

if (have_tech(4,"Republic")){
enable_type_by_tribe("Armed Supply Wagon","Russians","Barracks",0,2);
enable_type_by_tribe("Manchu Musketeers","Russians","Barracks",0,0);
gain_upgrade(4,"Partisan");
enable_type_by_tribe("Fur Trapper","Russians","Barracks",0,3);
set_nation_name("Russians","Underground Railroad");
}

if (have_tech(2,"Republic")){
enable_type_by_tribe("Armed Supply Wagon","Nubians","Barracks",0,2);
enable_type_by_tribe("Manchu Musketeers","Nubians","Barracks",0,0);
gain_upgrade(2,"Partisan");
enable_type_by_tribe("Fur Trapper","Nubianss","Barracks",0,3);
set_nation_name("Nubians","Underground Railroad");
}

if (have_tech(1,"Republic")){
enable_type_by_tribe("Armed Supply Wagon","Lakota","Barracks",0,2);
enable_type_by_tribe("Manchu Musketeers","Lakota","Barracks",0,0);
gain_upgrade(1,"Partisan");
enable_type_by_tribe("Fur Trapper","Lakota","Barracks",0,3);
set_nation_name("Lakota","Underground Railroad");
}

if (have_tech(7,"Republic")){
enable_type_by_tribe("Armed Supply Wagon","Chinese","Barracks",0,2);
enable_type_by_tribe("Manchu Musketeers","Chinese","Barracks",0,0);
gain_upgrade(7,"Partisan");
enable_type_by_tribe("Fur Trapper","Chinese","Barracks",0,3);
set_nation_name("Chinese","Underground Railroad");
}

if (have_tech(5,"Republic")){
enable_type_by_tribe("Armed Supply Wagon","Inca","Barracks",0,2);
enable_type_by_tribe("Manchu Musketeers","Inca","Barracks",0,0);
gain_upgrade(5,"Partisan");
enable_type_by_tribe("Fur Trapper","Inca","Barracks",0,3);
set_nation_name("Inca","Underground Railroad");
}
}
//Main script body.
//Add triggers and other commands to be executed each game frame here.
//Use Edit->Insert Trigger Function to select from the list of available functions
//Use Edit->Insert Trigger Block to add a blank trigger block.
//See ./scenario/sample_script.bhs for additional documentation

}
AuthorReplies:
Terikel Grayhair
Imperator
(id: Terikel706)
posted 11-22-16 00:59 AM EDT (US)     1 / 1       
You have a couple of double-s's in the quotes. Nubianss, Survivorss,

If the script is trying to match entries to the game database and does not find one, then that could be your problem.

Check your spelling. That might be the error.

|||||||||||||||| A transplanted Viking, born a millennium too late. |||||||||||||||||
|||||||||||||||| Too many Awards to list in Signature, sorry lords...|||||||||||||||||
|||||||||||||||| Listed on my page for your convenience and envy.|||||||||||||||||
Somewhere over the EXCO Rainbow
Master Skald, Order of the Silver Quill, Guild of the Skalds
Champion of the Sepia Joust- Joust I, II, IV, VI, VII, VIII
You must be logged in to post messages.
Please login or register

Hop to:    

Rise of Nations Heaven | HeavenGames