Having a small problem with this script, basically mine with the loot totally designed by me.
I get a line 12 Identifier expected error
and line 307 }expected error.

but these look right so whats wrong? Have rewritten it several times and still don't think I see anything bad.
 

Attachments

  • CrimsonDeath.cs
    11.5 KB · Views: 7
You should download the latest Visual Studio Express. It gives not only formatting help, showing you where stuff it misaligned or missing, but can reformat the document so that stuff lines up in the proper way, and the intellisense feature can help with inserting values and creating overrides and other methods.

Line 7, I assume this is a creature. You were missing " : BaseCreature"
Line 12, you had periods in place of 2 commas.
Line 51, you had 2 closing braces next to eachother - "}}"
Line 307-308, you do not close the OnDeath(Container c) method with a closing brace. It was missing.
 

Attachments

  • CrimsonDeath.cs
    11.6 KB · Views: 3
OK it looked better in the Visual studio, but then threw a
cs0115: line 79: 'Server.Mobiles.CrimsonDeath.GivesMLMajorArtifact' : no suitable method found to override
used the // to bypass this and got
"
Error 1 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 86 25
Error 2 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 93 25
Error 3 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 100 25
Error 4 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 107 25
Error 5 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 114 25
Error 6 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 121 25
Error 7 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 128 25
Error 8 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 135 25
Error 9 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 142 25
Error 10 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 149 25
Error 11 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 156 25
Error 12 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 163 25
Error 13 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 170 25
Error 14 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 177 25
Error 15 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 184 25
Error 16 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 189 25
Error 17 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 194 25
Error 18 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 207 25
Error 19 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 216 62
Error 20 Type or namespace definition, or end-of-file expected c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 218 9
"
 

Attachments

  • Crimson death.zip
    8.6 KB · Views: 2
OK it looked better in the Visual studio, but then threw a
cs0115: line 79: 'Server.Mobiles.CrimsonDeath.GivesMLMajorArtifact' : no suitable method found to override
used the // to bypass this and got
" Error 1 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 86 25
Error 2 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 93 25
Error 3 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 100 25
Error 4 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 107 25
Error 5 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 114 25
Error 6 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 121 25
Error 7 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 128 25
Error 8 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 135 25
Error 9 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 142 25
Error 10 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 149 25
Error 11 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 156 25
Error 12 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 163 25
Error 13 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 170 25
Error 14 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 177 25
Error 15 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 184 25
Error 16 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 189 25
Error 17 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 194 25
Error 18 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 207 25
Error 19 Expected class, delegate, enum, interface, or struct c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 216 62
Error 20 Type or namespace definition, or end-of-file expected c:\Shard\Live\Scripts\Custom\Crimson death\CrimsonDeath.cs 218 9"
 
Line 85. you forgot to comment out the closing brace of the GivesMLMajorArtifact method.
 
If you mean other scripts, that would make more sense. Once you fix syntax and formatting errors, it moves on to missing using statements. Once those are fixed, it moves on to bad constructors and missing or incorrect parameters. If you mean the same script, let me see it, and I will have a look. It looked OK to me other than line 85 needed commented out.
 
Yes don't give up have been there in the past but then figured out, this is an excellent learning time :) Can I ask where you did get this script and are you loading this with ServUO? I'm by far not a coder but later I can load this into Visual to see what happens :)
 
Actually I melded 2 scripts one I had in RunUO back in 2.0 time, and then I saw the crimson dragon and feel in love again. I am working on re editing the armor because it makes you way to Godlike, but if I can get this setup it will only be on one quest in my 12 map shard. Your welcome to it if you think you can fix it. I mean to publish it when its at working form.
 

Attachments

  • Crimson death.zip
    8.6 KB · Views: 2
What I still see is this line : base(AIType.AI_Mage. FightMode.Closest. 10, 1, 0.2, 0.4)
--10 shows identifier expected ( maybe Lokai can help with this)
Not sure if this has to do with this line
private DateTime m_NextTerror;
Plus were you not getting any errors on the server for this line
public override bool GivesMLMajorArtifact

EDIT: Ok fixed those errors and removed a few codes, but the whole map codes I'm not sure if they give you errors? But try this and then it might give Lokai a bit more to work with, please post any errors which you get.
 

Attachments

  • [ServUO.com]-CrimsonDeath.cs
    11.6 KB · Views: 5
Last edited:
errors:
+Customs/CrimsonDeath.cs:
cs1001: Line12:Identfier expected
cs1513: line 307: } expected


Fixed Line 12
it seamed to fix 307 as well.

But now

"Error 1 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 52 16
Error 2 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 57 25
Error 3 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 64 25
Error 4 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 71 25
Error 5 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 78 25
Error 6 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 85 25
Error 7 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 92 25
Error 8 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 99 25
Error 9 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 106 25
Error 10 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 113 25
Error 11 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 120 25
Error 12 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 127 25
Error 13 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 134 25
Error 14 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 141 25
Error 15 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 148 25
Error 16 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 155 25
Error 17 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 162 25
Error 18 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 169 25
Error 19 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 176 25
Error 20 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 183 25
Error 21 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 188 25
Error 22 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 193 25
Error 23 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 206 25
Error 24 Expected class, delegate, enum, interface, or struct c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 215 62
Error 25 Type or namespace definition, or end-of-file expected c:\JustUO Release 1\Scripts\Customs\Crimson death\CrimsonDeath.cs 217 9"
 

Attachments

  • CrimsonDeath .cs
    11.5 KB · Views: 1
Oh your testing this with JustUO which could be different then ServUO, any time you fix an error be sure to check threw the rest of the script to see if there is an "expected" :) Maybe Lokai can help with this not sure.
 
This is getting really frustrating. I look at the latest file you attached here, and almost every single error that I fixed is back in the file. Same problems same places. What gives here?

Line 11:
Code:
public CrimsonDeath(): base(AIType.AI_Mage. FightMode.Closest, 10, 1, 0.2, 0.4)

after AI_Mage you have a period instead of a comma. Change that.

Line 50:
Code:
  }}

You have 2 braces next to each other. Remove one.

Line 306 - 307
Code:
  public override void OnDeath(Container c)
  {
  base.OnDeath(c);

  if (Utility.RandomDouble() < 0.6)
  c.DropItem(new ParrotItem());

  if (Utility.RandomDouble() < 0.025)
  c.DropItem(new CrimsonCincture());
   
  switch  (Utility.Random(7))       
  {
  case 0: PackItem(new ArmsOftheDragon()); break;
         case 1: PackItem(new ChestOftheDragon()); break;
         case 2: PackItem(new GauntletsOftheDragon()); break;
         case 3: PackItem(new HelmOftheDragoni()); break;
         case 4: PackItem(new LegsOftheDragon()); break;
  case 5: PackItem(new GorgetOftheDragon()); break;
  case 6: PackItem(new ShroudOftheDragon()); break;
  }
  private void Terrorize(object o)
  {

You start the Terrorize method without closing the OnDeath method. You need to insert a closing brace " } " before line 307.
 
OK on Vs 2008 I could have pulled up the errors on 2012 I can't seam to do that. Somebody told me I should switch. grrr. Instead of the (simple to fix) errors that were there I get 27 more. Maybe I should stop trying ? most of these are failure to override.
 

Attachments

  • CrimsonDeath .cs
    11.5 KB · Views: 2
Line 7, should read:

Code:
  public class CrimsonDeath : BaseCreature

This is assuming the CrimsonDeath is some type of creature.
 
Ok that fixed that part from 26 to 1 error
cs0115 : line 78: 'Server.mobiles.CrimsonDeath. Gives MLMajorArtifact' : no suitable method found to override.
Using the // to block out that line just pulls this up-
+ Custom/Crimson Death/CrimsonDeath.cs:
cs1061: Line 44: 'Server.mobiles.CrimsonDeath. ' does not contain a definition for ' PackResources' and no extension method 'PackResorces' accepting a first argument of type 'Server.mobiles.CrimsonDeath. ' could be found <are you missing a using directive or an assembly reference?>

OK I used the // again to block out That Line, and It works , as far as loading is concerned.
n Now to see if the rest works.
"
    1. public class CrimsonDeath : BaseCreature"
but I totally missed that last one.
 

Attachments

  • CrimsonDeath.cs
    10.4 KB · Views: 7
OK the crimson Death does run, BUT it does not seem to drop the special armor. just gold and a bunch of junque
 
OK the crimson Death does run, BUT it does not seem to drop the special armor. just gold and a bunch of junque

Try change
Code:
case 0: PackItem(new ArmsOftheDragon()); break;"
to
Code:
case 0: c.PackItem(new ArmsOftheDragon()); break;"

i.e. add a "c." before the "PackItem"
 
seems to work fine for me, i would suggest removing this.Hue = 16385; from before death as the ethereal hue can sometimes cause issues.

maybe that's just a lingering paranoia from the old days of UO though ( i don't know if I've tested the possible client crash it can cause since Sphere 55i o_O )

anyway, confirmed that you need to use c.DropItem

block out GenerateLoot
/*
public override void GenerateLoot()
{
this.AddLoot(LootPack.AosSuperBoss, 8);
this.AddLoot(LootPack.Gems, 22);
this.AddLoot(LootPack.AosSuperBoss, 8);
}
*/
and it makes it easier to see that it's working.

ps - quite the creature you got there.
 
Back