RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

What Version of mono did you use to compile it?

Xen-miao

Sorceror
What Version of mono did you use to compile it?

Sorry i'm using a server with Debian Lenny, i vould like to compile my Run-Uo2 with mono. I can compile it (with 64 warns) but when I run it , i have a lot of problems.
If i run the site-version of run-uo i've not any kind of problems.
Do you think it's a problem of Mono-compiler Version or something else? Do you need some more informations about?
 

Xen-miao

Sorceror
Thanks for you answer. But i still have a lot of problems.
I've installed the newest version of mono 2.4.2.3 as you did, i putted all the src files of the core in a project using MonoDevelopper and i've build the Project adding all the required references.
I obteined 64 warns like : CS0219: Line 813: The variable `pos' is assigned but its value is never used.
I mean "Variable assigned but never used".
I put my compiled file (without any kind of modifications) in the folder (of Run-Uo 2 Mono Final) that i downloaded in my pc with all the Script without any modification.

I executed my compiled run-uo.exe and i had : Scripts: Compiling C# scripts...done (0 errors, 1571 warnings)
(i've attacked the test of the errors)

What could I do ?
Could you give me a makefile? i would like to understand what is the problem ._. can you help me?

PS.
I thought before it was a different compiler problem but now... i don't know what to think... before if I copy all the source files in the same directory of the Run-Uo 2 Mono Final (with my compiled exe file) it _seems_ to work O_O".
Code:
RunUO - [[url]www.runuo.com][/url] Version 2.0, Build 3572.643
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Core: Unix environment detected
Scripts: Compiling C# scripts...done (cached)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (4 items, 0 mobiles)
Enter the Ultima Online directory:
> Regions: Loading...Could not parse Map attribute 'name' in element 'Facet'
Could not parse Map attribute 'name' in element 'Facet'
Could not parse Map attribute 'name' in element 'Facet'
Could not parse Map attribute 'name' in element 'Facet'
Could not parse Map attribute 'name' in element 'Facet'
done
World: Loading...Error:
System.Exception: Type 'Server.Mobiles.PlayerMobile' does not have a serialization constructor
  at Server.World.Load () [0x00000] 
  at Server.Core.Main (System.String[] args) [0x00000] 
This exception is fatal, press return to exit
PPS. The second exception is normal because i didn't insert the UO-folder. BUT! how is this possible that if i put there the src files, it my Run-uo Mono-compiled runs? O_O"
 

Attachments

  • error.txt
    285.5 KB · Views: 3

Mark

Knight
To compile the core, try:

Code:
gmcs -optimize -unsafe -t:exe -out:RunUO.exe -win32icon:runuo.ico -d:MONO -recurse:*.cs

When using a new core, you should probably clear out the old Script assembly:

Code:
rm -rf Scripts/Output

You can ignore warnings like "CS0219: Line 813: The variable `pos' is assigned but its value is never used."

If you download RunUO 2.0 Final MONO, you do not need to compile your own core.
 

Xen-miao

Sorceror
I made as you wrote before and i have a good result but i've always those warnings
Code:
./Main.cs(460,37): warning CS0219: The variable `ms' is assigned but its value is never used
./Map.cs(1815,33): warning CS0219: The variable `start' is assigned but its value is never used
./Mobile.cs(8870,32): warning CS0219: The variable `oldRegion' is assigned but its value is never used
./MultiData.cs(108,61): warning CS0219: The variable `extra' is assigned but its value is never used
./TileMatrix.cs(405,78): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrix.cs(478,66): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(105,83): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(174,91): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./Items/BaseMulti.cs(159,29): warning CS0219: The variable `version' is assigned but its value is never used
./Items/SecureTradeContainer.cs(116,29): warning CS0219: The variable `version' is assigned but its value is never used
./Network/Listener.cs(101,46): warning CS0219: The variable `res' is assigned but its value is never used
./Network/PacketHandlers.cs(406,46): warning CS0219: The variable `layer' is assigned but its value is never used
./Network/PacketHandlers.cs(521,32): warning CS0219: The variable `lang' is assigned but its value is never used
./Network/PacketHandlers.cs(520,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(550,29): warning CS0219: The variable `type' is assigned but its value is never used
./Network/PacketHandlers.cs(549,29): warning CS0219: The variable `lastTip' is assigned but its value is never used
./Network/PacketHandlers.cs(564,29): warning CS0219: The variable `value' is assigned but its value is never used
./Network/PacketHandlers.cs(583,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(591,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(621,29): warning CS0219: The variable `v8' is assigned but its value is never used
./Network/PacketHandlers.cs(620,29): warning CS0219: The variable `v7' is assigned but its value is never used
./Network/PacketHandlers.cs(619,29): warning CS0219: The variable `v6' is assigned but its value is never used
./Network/PacketHandlers.cs(618,29): warning CS0219: The variable `v5' is assigned but its value is never used
./Network/PacketHandlers.cs(617,29): warning CS0219: The variable `v4' is assigned but its value is never used
./Network/PacketHandlers.cs(616,32): warning CS0219: The variable `s4' is assigned but its value is never used
./Network/PacketHandlers.cs(615,32): warning CS0219: The variable `s3' is assigned but its value is never used
./Network/PacketHandlers.cs(614,32): warning CS0219: The variable `s2' is assigned but its value is never used
./Network/PacketHandlers.cs(613,32): warning CS0219: The variable `s1' is assigned but its value is never used
./Network/PacketHandlers.cs(612,29): warning CS0219: The variable `v3' is assigned but its value is never used
./Network/PacketHandlers.cs(611,29): warning CS0219: The variable `v2' is assigned but its value is never used
./Network/PacketHandlers.cs(610,29): warning CS0219: The variable `v1' is assigned but its value is never used
./Network/PacketHandlers.cs(693,37): warning CS0219: The variable `light' is assigned but its value is never used
./Network/PacketHandlers.cs(692,37): warning CS0219: The variable `dungeon' is assigned but its value is never used
./Network/PacketHandlers.cs(691,37): warning CS0219: The variable `nightFX' is assigned but its value is never used
./Network/PacketHandlers.cs(690,37): warning CS0219: The variable `music' is assigned but its value is never used
./Network/PacketHandlers.cs(689,37): warning CS0219: The variable `soundFX' is assigned but its value is never used
./Network/PacketHandlers.cs(687,37): warning CS0219: The variable `zEnd' is assigned but its value is never used
./Network/PacketHandlers.cs(686,37): warning CS0219: The variable `zStart' is assigned but its value is never used
./Network/PacketHandlers.cs(685,37): warning CS0219: The variable `height' is assigned but its value is never used
./Network/PacketHandlers.cs(684,37): warning CS0219: The variable `width' is assigned but its value is never used
./Network/PacketHandlers.cs(683,37): warning CS0219: The variable `y' is assigned but its value is never used
./Network/PacketHandlers.cs(682,37): warning CS0219: The variable `x' is assigned but its value is never used
./Network/PacketHandlers.cs(681,37): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(866,32): warning CS0219: The variable `lang' is assigned but its value is never used
./Network/PacketHandlers.cs(891,29): warning CS0219: The variable `hue' is assigned but its value is never used
./Network/PacketHandlers.cs(890,29): warning CS0219: The variable `itemID' is assigned but its value is never used
./Network/PacketHandlers.cs(888,29): warning CS0219: The variable `menuID' is assigned but its value is never used
./Network/PacketHandlers.cs(948,29): warning CS0219: The variable `minusOne' is assigned but its value is never used
./Network/PacketHandlers.cs(1055,29): warning CS0219: The variable `flags' is assigned but its value is never used
./Network/PacketHandlers.cs(1455,29): warning CS0219: The variable `key' is assigned but its value is never used
./Network/PacketHandlers.cs(1715,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(1714,29): warning CS0219: The variable `width' is assigned but its value is never used
./Network/PacketHandlers.cs(1802,32): warning CS0219: The variable `serial' is assigned but its value is never used
./Network/PacketHandlers.cs(1816,32): warning CS0219: The variable `av' is assigned but its value is never used
./Network/PacketHandlers.cs(1815,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(1899,29): warning CS0219: The variable `clientIP' is assigned but its value is never used
./Network/PacketHandlers.cs(1892,32): warning CS0219: The variable `name' is assigned but its value is never used
./Network/PacketHandlers.cs(2052,29): warning CS0219: The variable `clientIP' is assigned but its value is never used
./Network/PacketHandlers.cs(2051,29): warning CS0219: The variable `charSlot' is assigned but its value is never used
./Network/PacketHandlers.cs(2022,29): warning CS0219: The variable `unk3' is assigned but its value is never used
./Network/PacketHandlers.cs(2021,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(2020,29): warning CS0219: The variable `unk1' is assigned but its value is never used
./Persistence/StandardSaveStrategy.cs(97,36): warning CS0219: The variable `decaying' is assigned but its value is never used
./Item.cs(1899,37): warning CS0169: The private method `Server.Item.SetSaveFlag(ref Server.Item.SaveFlag, Server.Item.SaveFlag, bool)' is never used
./Timer.cs(365,36): warning CS0414: The private field `Server.Timer.m_QueueCountAtSlice' is assigned but its value is never used
./ScriptCompiler.cs(531,30): warning CS0169: The private method `Server.ScriptCompiler.LoadScriptedAssembly(System.Collections.Generic.List<System.Reflection.Assembly>, string, Server.ScriptCompiler.Compiler, bool)' is never used
./Gumps/Gump.cs(370,32): warning CS0169: The private method `Server.Gumps.Gump.Compile()' is never used
./Persistence/FileQueue.cs(39,37): warning CS0414: The private field `Server.FileQueue.Chunk.offset' is assigned but its value is never used
Compilation succeeded - 68 warning(s)

Is it a problem? I tried to put that compiled file in a directory with the scripts (original ones) folder and the compilation has well succeded. Can I think my problem is solved or those warnings aren't a good thing?
(i tried to compile the same src with Windows-VisualStudio and Windows-MonoDevelopper and i've not any warning .-.)
 

Mark

Knight
Xen-miao;814551 said:
I made as you wrote before and i have a good result but i've always those warnings
Code:
./Main.cs(460,37): warning CS0219: The variable `ms' is assigned but its value is never used
./Map.cs(1815,33): warning CS0219: The variable `start' is assigned but its value is never used
./Mobile.cs(8870,32): warning CS0219: The variable `oldRegion' is assigned but its value is never used
./MultiData.cs(108,61): warning CS0219: The variable `extra' is assigned but its value is never used
./TileMatrix.cs(405,78): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrix.cs(478,66): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(105,83): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(174,91): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./Items/BaseMulti.cs(159,29): warning CS0219: The variable `version' is assigned but its value is never used
./Items/SecureTradeContainer.cs(116,29): warning CS0219: The variable `version' is assigned but its value is never used
./Network/Listener.cs(101,46): warning CS0219: The variable `res' is assigned but its value is never used
./Network/PacketHandlers.cs(406,46): warning CS0219: The variable `layer' is assigned but its value is never used
./Network/PacketHandlers.cs(521,32): warning CS0219: The variable `lang' is assigned but its value is never used
./Network/PacketHandlers.cs(520,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(550,29): warning CS0219: The variable `type' is assigned but its value is never used
./Network/PacketHandlers.cs(549,29): warning CS0219: The variable `lastTip' is assigned but its value is never used
./Network/PacketHandlers.cs(564,29): warning CS0219: The variable `value' is assigned but its value is never used
./Network/PacketHandlers.cs(583,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(591,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(621,29): warning CS0219: The variable `v8' is assigned but its value is never used
./Network/PacketHandlers.cs(620,29): warning CS0219: The variable `v7' is assigned but its value is never used
./Network/PacketHandlers.cs(619,29): warning CS0219: The variable `v6' is assigned but its value is never used
./Network/PacketHandlers.cs(618,29): warning CS0219: The variable `v5' is assigned but its value is never used
./Network/PacketHandlers.cs(617,29): warning CS0219: The variable `v4' is assigned but its value is never used
./Network/PacketHandlers.cs(616,32): warning CS0219: The variable `s4' is assigned but its value is never used
./Network/PacketHandlers.cs(615,32): warning CS0219: The variable `s3' is assigned but its value is never used
./Network/PacketHandlers.cs(614,32): warning CS0219: The variable `s2' is assigned but its value is never used
./Network/PacketHandlers.cs(613,32): warning CS0219: The variable `s1' is assigned but its value is never used
./Network/PacketHandlers.cs(612,29): warning CS0219: The variable `v3' is assigned but its value is never used
./Network/PacketHandlers.cs(611,29): warning CS0219: The variable `v2' is assigned but its value is never used
./Network/PacketHandlers.cs(610,29): warning CS0219: The variable `v1' is assigned but its value is never used
./Network/PacketHandlers.cs(693,37): warning CS0219: The variable `light' is assigned but its value is never used
./Network/PacketHandlers.cs(692,37): warning CS0219: The variable `dungeon' is assigned but its value is never used
./Network/PacketHandlers.cs(691,37): warning CS0219: The variable `nightFX' is assigned but its value is never used
./Network/PacketHandlers.cs(690,37): warning CS0219: The variable `music' is assigned but its value is never used
./Network/PacketHandlers.cs(689,37): warning CS0219: The variable `soundFX' is assigned but its value is never used
./Network/PacketHandlers.cs(687,37): warning CS0219: The variable `zEnd' is assigned but its value is never used
./Network/PacketHandlers.cs(686,37): warning CS0219: The variable `zStart' is assigned but its value is never used
./Network/PacketHandlers.cs(685,37): warning CS0219: The variable `height' is assigned but its value is never used
./Network/PacketHandlers.cs(684,37): warning CS0219: The variable `width' is assigned but its value is never used
./Network/PacketHandlers.cs(683,37): warning CS0219: The variable `y' is assigned but its value is never used
./Network/PacketHandlers.cs(682,37): warning CS0219: The variable `x' is assigned but its value is never used
./Network/PacketHandlers.cs(681,37): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(866,32): warning CS0219: The variable `lang' is assigned but its value is never used
./Network/PacketHandlers.cs(891,29): warning CS0219: The variable `hue' is assigned but its value is never used
./Network/PacketHandlers.cs(890,29): warning CS0219: The variable `itemID' is assigned but its value is never used
./Network/PacketHandlers.cs(888,29): warning CS0219: The variable `menuID' is assigned but its value is never used
./Network/PacketHandlers.cs(948,29): warning CS0219: The variable `minusOne' is assigned but its value is never used
./Network/PacketHandlers.cs(1055,29): warning CS0219: The variable `flags' is assigned but its value is never used
./Network/PacketHandlers.cs(1455,29): warning CS0219: The variable `key' is assigned but its value is never used
./Network/PacketHandlers.cs(1715,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(1714,29): warning CS0219: The variable `width' is assigned but its value is never used
./Network/PacketHandlers.cs(1802,32): warning CS0219: The variable `serial' is assigned but its value is never used
./Network/PacketHandlers.cs(1816,32): warning CS0219: The variable `av' is assigned but its value is never used
./Network/PacketHandlers.cs(1815,29): warning CS0219: The variable `unk' is assigned but its value is never used
./Network/PacketHandlers.cs(1899,29): warning CS0219: The variable `clientIP' is assigned but its value is never used
./Network/PacketHandlers.cs(1892,32): warning CS0219: The variable `name' is assigned but its value is never used
./Network/PacketHandlers.cs(2052,29): warning CS0219: The variable `clientIP' is assigned but its value is never used
./Network/PacketHandlers.cs(2051,29): warning CS0219: The variable `charSlot' is assigned but its value is never used
./Network/PacketHandlers.cs(2022,29): warning CS0219: The variable `unk3' is assigned but its value is never used
./Network/PacketHandlers.cs(2021,29): warning CS0219: The variable `unk2' is assigned but its value is never used
./Network/PacketHandlers.cs(2020,29): warning CS0219: The variable `unk1' is assigned but its value is never used
./Persistence/StandardSaveStrategy.cs(97,36): warning CS0219: The variable `decaying' is assigned but its value is never used
./Item.cs(1899,37): warning CS0169: The private method `Server.Item.SetSaveFlag(ref Server.Item.SaveFlag, Server.Item.SaveFlag, bool)' is never used
./Timer.cs(365,36): warning CS0414: The private field `Server.Timer.m_QueueCountAtSlice' is assigned but its value is never used
./ScriptCompiler.cs(531,30): warning CS0169: The private method `Server.ScriptCompiler.LoadScriptedAssembly(System.Collections.Generic.List<System.Reflection.Assembly>, string, Server.ScriptCompiler.Compiler, bool)' is never used
./Gumps/Gump.cs(370,32): warning CS0169: The private method `Server.Gumps.Gump.Compile()' is never used
./Persistence/FileQueue.cs(39,37): warning CS0414: The private field `Server.FileQueue.Chunk.offset' is assigned but its value is never used
Compilation succeeded - 68 warning(s)

Is it a problem? I tried to put that compiled file in a directory with the scripts (original ones) folder and the compilation has well succeded. Can I think my problem is solved or those warnings aren't a good thing?
(i tried to compile the same src with Windows-VisualStudio and Windows-MonoDevelopper and i've not any warning .-.)

The 169, 219, and 414 warnings are harmless. They are normal with MONO. Microsoft's compiler typically only displays those warnings when there is an error as well.

You can prevent a warning from being displayed with something like '#pragma warning disable 219' in source code or '-nowarn:219' on the command line. This does not impact the final result.

The following warnings are also normal with MONO:

Code:
./TileMatrix.cs(405,78): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrix.cs(478,66): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(105,83): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'
./TileMatrixPatch.cs(174,91): warning CS0618: `System.IO.FileStream.Handle' is obsolete: `Use SafeFileHandle instead'

MONO does not yet implement SafeFileHandle, so we have no alternative at this time.
 
Top