Full Version : Can not explicitly convert
xmlspawner >>Troubleshooting >>Can not explicitly convert
<< Prev | Next >>
blaatz- 11-03-2006

CODE
Errors: + Custom/xml spawner install pack/xmlSpawner2_20/XmlSpawner2.cs: CS0029: Line 9446: Cannot implicitly convert type 'System.Collections.ArrayL ist' to 'System.Collections.Generic.List<Server.Tile>'

this is the code error i get when i load xml spawners and restart can you point me in the right direction?
ravyn38- 08-21-2007
Well, I'm a little curious, no one answered your post and I am just putting XML into a clean 2.0 Rc1 shard today and got the same error

CODE
RunUO - [www.runuo.com] Version 2.0, Build 2357.32527 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...failed (1 errors, 0 warnings) Errors: + Cutsom Systems/XmlSpawner2_20_v321_1of3/XmlSpawner2.cs:
CS0029: Line 9611: Cannot implicitly convert type 'System.Collections.ArrayL
ist' to 'System.Collections.Generic.List<Server.Tile>'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Think I'll bump this post that way we can both find out what's up.
ravyn38- 08-21-2007
OK, guess we're both morons.... Arte explicity left made an 1.0/2.0 thing in there, and if we'd have bothered to look at the script b4 posting here, we wouldnt sound like idiots

CODE
#if(RUNUO2RC1) ArrayList tiles = map.GetTilesAt(new Point2D(X, Y), true, true, true); #else //List<Server.Tile> tiles = map.GetTilesAt(new Point2D(X, Y), true, true, true); #endif

After commenting out the 1.0 line, I did get another error though

CODE
Errors: + Cutsom Systems/XmlSpawner2_20_v321_1of3/XmlSpawner2.cs: CS0103: Line 9613: The name 'tiles' does not exist in the current context CS0103: Line 9616: The name 'tiles' does not exist in the current context

This one, I have no clue on... Any help would be super appreciated!
ArteGordon- 08-21-2007
dont comment out any of those lines.
Look at the Latest News section of the main xmlspawner release post.