Full Version : Fix Warnings
xmlspawner >>Scripting Support >>Fix Warnings
<< Prev | Next >>
Erica- 08-30-2006
Hi how would i fix theses warnings

CODE
Warnings: + Custom Scripts 2.0/Knives Chat 2.02 for RunUO 2.0/Knives Chat v2.02 for RunUO 2.0/Gumps/OptionsGump.cs: CS0618: Line 617: 'Server.Mobile.CloseGump(System.Type, int)' is obsolete: ' Use CloseGump( Type ) instead.'
CS0618: Line 631: 'Server.Mobile.CloseGump(System.Type, int)' is obsolete: '
Use CloseGump( Type ) instead.'
CS0618: Line 651: 'Server.Mobile.CloseGump(System.Type, int)' is obsolete: '

Heres one part of line 617 on the script

CODE
private void PublicDisabled() { c_Info.PublicDisabled = !c_Info.PublicDisabled; Owner.CloseGump( typeof( ListGump ), -5 ); NewGump();
}

how would i fix that line for line 617 cause once i get this line warning fixed the rest of the lines in warnings would be the same to get it changed.
ArteGordon- 08-31-2006
the latest 2.0 SVN CloseGump method no longer supports sending buttonids other than 0 when closing a gump, so you would change this
Owner.CloseGump( typeof( ListGump ), -5 );
to
Owner.CloseGump( typeof( ListGump ) );
to get rid of the warning. Note that the actual gump OnResponse code may have to be changed to deal with this properly if it was expecting a buttonid of -5 before.