Hey so I have been messing around with OTWLR trying to get it to work. at first I had the basic error people seem to be getting but after that error I received this:


Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Engines/BulkOrders/LargeBOD.cs:
CS1513: Line 278: } expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

on Line 278 there is a } its just not recognizing it

any tips?
 
public void EndCombine(Mobile from, object o)
{
if (o is Item && ((Item)o).IsChildOf(from.Backpack))
{
if (o is SmallBOD)
{
SmallBOD small = (SmallBOD)o;
LargeBulkEntry entry = null;
for (int i = 0; entry == null && i < this.m_Entries.Length; ++i)
{
if (this.m_Entries.Details.Type == small.Type)
entry = this.m_Entries;
}
if (entry == null)
{
from.SendLocalizedMessage(1045160); // That is not a bulk order for this large request.
}
else if (this.m_RequireExceptional && !small.RequireExceptional)
{
from.SendLocalizedMessage(1045161); // Both orders must be of exceptional quality.
}
//daat99 OWLTR start - custom ores
else if ( m_Material >= BulkMaterialType.DullCopper && m_Material <= BulkMaterialType.Platinum && small.Material != m_Material )
//daat99 OWLTR end - custom ores
{
from.SendLocalizedMessage( 1045162 ); // Both orders must use the same ore type.
}
//daat99 OWLTR start - custom leather
else if ( m_Material >= BulkMaterialType.Spined && m_Material <= BulkMaterialType.Ethereal && small.Material != m_Material )
//daat99 OWLTR end - custom leather
{
from.SendLocalizedMessage( 1049351 ); // Both orders must use the same leather type.
}
//daat99 OWLTR start - custom wood
else if ( m_Material >= BulkMaterialType.OakWood && m_Material <= BulkMaterialType.Petrified && small.Material != m_Material )
{
from.SendMessage( "Both orders must use the same wood type." ); // Both orders must use the same leather type.
}
//daat99 OWLTR end - custom wood
{
else if (this.m_AmountMax != small.AmountMax)
{
from.SendLocalizedMessage(1045163); // The two orders have different requested amounts and cannot be combined.
}
else if (small.AmountCur < small.AmountMax)
{
from.SendLocalizedMessage(1045164); // The order to combine with is not completed.
}
else if (entry.Amount >= this.m_AmountMax)
{
from.SendLocalizedMessage(1045166); // The maximum amount of requested items have already been combined to this deed.
}
else
{
entry.Amount += small.AmountCur;
small.Delete();
from.SendLocalizedMessage(1045165); // The orders have been combined.
from.SendGump(new LargeBODGump(from, this));
if (!this.Complete)
this.BeginCombine(from);
}
}
else
{
from.SendLocalizedMessage(1045159); // That is not a bulk order.
}
}
else
{
from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it.
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(this.m_AmountMax);
writer.Write(this.m_RequireExceptional);
writer.Write((int)this.m_Material);
writer.Write((int)this.m_Entries.Length);
for (int i = 0; i < this.m_Entries.Length; ++i)
this.m_Entries.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
this.m_AmountMax = reader.ReadInt();
this.m_RequireExceptional = reader.ReadBool();
this.m_Material = (BulkMaterialType)reader.ReadInt();
this.m_Entries = new LargeBulkEntry[reader.ReadInt()];
for (int i = 0; i < this.m_Entries.Length; ++i)
this.m_Entries = new LargeBulkEntry(this, reader);
break;
}
}
if (this.Weight == 0.0)
this.Weight = 1.0;
if (Core.AOS && this.ItemID == 0x14EF)
this.ItemID = 0x2258;
if (this.Parent == null && this.Map == Map.Internal && this.Location == Point3D.Zero)
this.Delete();
}
}
}

[doublepost=1552105250][/doublepost]I don't know how to do the script view
 
Is line 278 after the line "from.SendLocalizedMessage(1045158); // You must have the item in your backpack to target it."?

If so try adding another "}" after the other 2

To post scripts you can use the little wrench on the top right I think and with out the whole script and can still be tough to help

I hope this helps though lol
 
ok so I added another "}" and I got this error:


Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Engines/BulkOrders/LargeBOD.cs:
CS1518: Line 281: Expected class, delegate, enum, interface, or struct
CS1518: Line 294: Expected class, delegate, enum, interface, or struct
CS1518: Line 297: Expected class, delegate, enum, interface, or struct
CS1518: Line 311: Expected class, delegate, enum, interface, or struct
CS1518: Line 311: Expected class, delegate, enum, interface, or struct
CS1518: Line 314: Expected class, delegate, enum, interface, or struct
CS1518: Line 314: Expected class, delegate, enum, interface, or struct
CS1022: Line 317: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 
Might just need to be in a different place.
What do you use for editing scripts? visual studio or note pad or.....?
 
I have been using Visual studio and Notepad++
im also running on Runuo so I might have to upgrade to Servuo
 
Hmm visual studio is usually pretty good at finding missing "}"s. :) hopefully some one more talented than me will be able to help. Without being able to see the whole file in visual I Probably can't help much more.
 
Thank you all for helping me but I have just upgraded to a newer version of servuo instead of using runuo which has made this work
 
Back