|
||
|
|||||||
| Other Cant find a category above, use this one! Core mods not listed above go here! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#26 (permalink) |
|
Newbie
Join Date: Aug 2004
Age: 24
Posts: 35
|
Quick solution:
gmcs doesn't understand the different between Function() and Function<T> in derived classes. I try to trace the problem down, but failed. So, you should rename methods ReadItem<T>, ReadMobile<T> and ReadGuild<T> to smth different. I use ReadItemG<T>, ReadMobileG<T>, ReadGuildG<T>. (it is in Serialization.cs). Right solution: - fix this bug in mono. but I can't provide patch. I simply don't know how to fix it. hope, this help. (now I'm starting new shard on FreeBSD, hope, it will work). |
|
|
|
|
|
#27 (permalink) |
|
Forum Novice
|
Greetings,
If I change ReadItem<T>, ReadMobile<T> and ReadGuild<T>, I would have to change them in all the scripts (Scripts Folder) too, correct? Am I making the correct change? Code:
#if MONO
public abstract T ReadItemG<T>() where T : Item;
public abstract T ReadMobileG<T>() where T : Mobile;
public abstract T ReadGuildG<T>() where T : BaseGuild;
#else
public abstract T ReadItem<T>() where T : Item;
public abstract T ReadMobile<T>() where T : Mobile;
public abstract T ReadGuild<T>() where T : BaseGuild;
#endif
Code:
/RunUO-v2.0-SVN159/Scripts/Engines/CannedEvil/ChampionSpawn.cs:
CS0308: Line 960: The non-generic method `ReadItem' cannot be used with type arguments
CS0308: Line 961: The non-generic method `ReadItem' cannot be used with type arguments
-Ravon
__________________
|
|
|
|
|
|
#28 (permalink) |
|
Forum Novice
|
Greetings,
Nevermind, I think I changed too much stuff. I have gotten serialization.cs to work! Now just need to figure out how to (or maybe when) to get zlib32.dll to work. Is it part of the compile or how would you add it in? Code:
Error: System.DllNotFoundException: zlib32 at (wrapper managed-to-native) Server.Network.Compressor32:compress2 (byte[],int&,byte[],int,Server.Network.ZLibQuality)
__________________
|
|
|
|
|
|
#29 (permalink) |
|
Newbie
Join Date: Aug 2004
Age: 24
Posts: 35
|
Zlib solution is easy:
These lines in config (mono config, it is located in /etc/mono/) Code:
<dllmap dll="zlib32" target="libz.so" /> <dllmap dll="zlib32.dll" target="libz.so" /> And about prev. hack - yes, i change all scripts not to use functions with the same name. We can always revert it back when mono fixes it. |
|
|
|
|
|
#30 (permalink) |
|
Lurker
Join Date: Dec 2006
Posts: 8
|
Thank you.
I managed to get it running on FC5 after some modifications. The ones listed by GroboClown and Seirge together rendered both the RC1 and the SVN version runnable. Although I also had to skip the console input in the scripts and remove references to PageInfo in PageQueue.cs and MyRunUO in Mobiles.cs . The loading works fine but it cannot start the server again automatically (minor issue though, also due to mono). * Set CustomPath in Scripts/Misc/DataPath.cs for Scripts/Misc/AccountPrompt.cs (as noted by RavonTUS) Code:
00011: if ( Accounts.Count == 0 && !Core.Service )
{
+ #if MONO
+ Account a = new Account( "admin", "admin" );
+ a.AccessLevel = AccessLevel.Owner;
+ #else
Console.WriteLine( "This server has no accounts." );
...
+ #endif
}
(following the convention of groboclown's ant file) Code:
+#if !NOREPORTS
00010: using Server.Engines.Reports;
+#endif
...
+#if !NOREPORTS
00045: private PageInfo m_PageInfo;
public PageInfo PageInfo
{
get{ return m_PageInfo; }
}
+#endif
...
+#if !NOREPORTS
00134: if ( m_PageInfo != null )
{
lock ( m_PageInfo )
m_PageInfo.Responses.Add( PageInfo.GetAccount( mob ), text );
if ( PageInfo.ResFromResp( text ) != PageResolution.None )
m_PageInfo.UpdateResolver();
}
+#endif
...
+#if !NOREPORTS
00161: StaffHistory history = Reports.Reports.StaffHistory;
if ( history != null )
{
m_PageInfo = new PageInfo( this );
history.AddPage( m_PageInfo );
}
+#endif
Code:
+#if MYRUNUO 02957: Engines.MyRunUO.MyRunUO.QueueMobileUpdate( this ); +#endif ---- However, it does not seem as though the maps are handled correctly. The z levels are wrong here and there, falling through the ground at some but not all places, as well as certain (about half) of the tiles not being passable. My map definitions: Code:
RegisterMap( 0, 0, 0, 7168, 4096, 4, "Felucca", MapRules.FeluccaRules ); RegisterMap( 1, 1, 0, 7168, 4096, 0, "Trammel", MapRules.TrammelRules ); RegisterMap( 2, 2, 2, 2304, 1600, 1, "Ilshenar", MapRules.TrammelRules ); RegisterMap( 3, 3, 3, 2560, 2048, 1, "Malas", MapRules.TrammelRules ); RegisterMap( 4, 4, 4, 1448, 1448, 1, "Tokuno", MapRules.TrammelRules ); Last edited by nemeri; 02-16-2007 at 04:09 AM. |
|
|
|
|
|
#31 (permalink) | |
|
Lurker
Join Date: Dec 2006
Posts: 8
|
Gumps work by default, however the account list in the admin dialog does not (crashing the server). This is cause it cannot typecast the dictionary's generic ValueCollection into a non-generic ICollection for some reason. Perhaps mono's fault.
fix (but somewhat, not noticably, slower): Scripts/Accounting/Accounts.cs Code:
00027:- return m_Accounts.Values; + return new List<IAccount>(m_Accounts.Values); ----- The documentation generation causes teh server to crash Scripts/Commands/Docs.cs Code:
List<Assembly> assemblies = new List<Assembly>(); assemblies.Add( Core.Assembly ); foreach( Assembly asm in ScriptCompiler.Assemblies ) assemblies.Add( asm ); Assembly[] asms = assemblies.ToArray(); for( int i = 0; i < asms.Length; ++i ) * LoadTypes( asms[i], asms ); Quote:
Last edited by nemeri; 02-16-2007 at 04:18 AM. |
|
|
|
|
|
|
#32 (permalink) |
|
Forum Novice
|
Greetings,
It's been awhile. Here is my latest update. I would agree with nemeri that it works, however, there are alot of holes, invisible blocks, and when you create doors most are off the mark. I am not sure how to address this issue at this time. Hopefully, someone smarter than I will be able to use what we have put together and post back here some improvements. -Ravon INSTALLATION NOTES:
Note: I have used "#if MONO" statement so the files will still work with a Windows base system. If the DEV team would like to add them to the SVN, I would be so honored.
__________________
Last edited by RavonTUS; 03-08-2007 at 10:06 AM. |
|
|
|
|
|
#33 (permalink) |
|
Forum Novice
|
Greetings,
Well, I guess I will make one last stab at this and then let it rest for awhile. It appears that TileMatrix.cs and TileMatrixPatch.cs are written differently for .NET and MONO. This script is needed to correctly read the OSI files and for some reason, it does not appear to be reading static files correctly. You end up with invisible walls, holes in the map and z levels are off. It appears to me that Runtime.InteropServices is still not supported in MONO v1.2.3.1, so the RunUO devs coded a section for MONO. However, IMHO, it does not work correctly. Maybe MONO has changed since the original coding. In any case, would someone with more knowledge than me take a look at this section of code and see if you happen to notice why it is not reading the files correctly and maybe suggest a way to add code to help check for upper and lower case file names? TileMatrix.cs Code:
#if !MONO [System.Runtime.InteropServices.DllImport( "Kernel32" )] private unsafe static extern int _lread( IntPtr hFile, void *lpBuffer, int wBytes ); #endif Code:
#if !MONO
_lread( m_Statics.SafeFileHandle.DangerousGetHandle(), pTiles, length );
#else
if ( m_Buffer == null || length > m_Buffer.Length )
m_Buffer = new byte[length];
m_Statics.Read( m_Buffer, 0, length );
fixed ( byte *pbBuffer = m_Buffer )
{
StaticTile *pCopyBuffer = (StaticTile *)pbBuffer;
StaticTile *pCopyEnd = pCopyBuffer + count;
StaticTile *pCopyCur = pTiles;
while ( pCopyBuffer < pCopyEnd )
*pCopyCur++ = *pCopyBuffer++;
}
#endif
Code:
#if !MONO
_lread( m_Map.SafeFileHandle.DangerousGetHandle(), pTiles, 192 );
#else
if ( m_Buffer == null || 192 > m_Buffer.Length )
m_Buffer = new byte[192];
m_Map.Read( m_Buffer, 0, 192 );
fixed ( byte *pbBuffer = m_Buffer )
{
Tile *pBuffer = (Tile *)pbBuffer;
Tile *pEnd = pBuffer + 64;
Tile *pCur = pTiles;
while ( pBuffer < pEnd )
*pCur++ = *pBuffer++;
}
#endif
Code:
#if !MONO [System.Runtime.InteropServices.DllImport( "Kernel32" )] private unsafe static extern int _lread( IntPtr hFile, void *lpBuffer, int wBytes ); #endif Code:
#if !MONO
_lread( fsData.SafeFileHandle.DangerousGetHandle(), pTiles, 192 );
#else
if ( m_Buffer == null || 192 > m_Buffer.Length )
m_Buffer = new byte[192];
fsData.Read( m_Buffer, 0, 192 );
fixed ( byte *pbBuffer = m_Buffer )
{
Tile *pBuffer = (Tile *)pbBuffer;
Tile *pEnd = pBuffer + 64;
Tile *pCur = pTiles;
while ( pBuffer < pEnd )
*pCur++ = *pBuffer++;
}
#endif
Code:
#if !MONO
_lread( fsData.SafeFileHandle.DangerousGetHandle(), pTiles, length );
#else
if ( m_Buffer == null || length > m_Buffer.Length )
m_Buffer = new byte[length];
fsData.Read( m_Buffer, 0, length );
fixed ( byte *pbBuffer = m_Buffer )
{
StaticTile *pCopyBuffer = (StaticTile *)pbBuffer;
StaticTile *pCopyEnd = pCopyBuffer + tileCount;
StaticTile *pCopyCur = pTiles;
while ( pCopyBuffer < pCopyEnd )
*pCopyCur++ = *pCopyBuffer++;
}
#endif
-Ravon
__________________
Last edited by RavonTUS; 03-22-2007 at 08:30 AM. |
|
|
|
|
|
#34 (permalink) | |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
i have this errors, when starting server
Quote:
|
|
|
|
|
|
|
#38 (permalink) | |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
os: winxp
mono: 1.2.2.1 for windows rev: 162 patched (kubuntUO-08MAR2007) Quote:
|
|
|
|
|
|
|
#39 (permalink) |
|
Forum Novice
|
Greetings,
That's odd, maybe because your using Mono for Windows, however, I would not think it would make a difference. Take a look at the very first post in this thread, under Serialization.CS. The line numbers are a little off. I did not need all the changes, it seemed to work. Maybe I do need this one after all. -Ravon
__________________
|
|
|
|
|
|
#40 (permalink) | |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
under "mono 1.2.3.1 for windows" my scripts compiled without errors
under "mono 1.2.2.1 for windows" that error still available Quote:
if anybody have this error after patching (including Serialization.cs) make sure that you have the latest version of mono (or 1.2.3.1) |
|
|
|
|
|
|
#41 (permalink) |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
rev162
Code:
uo@monster/home/uo/TEST%RunUO - [www.runuo.com] Version 2.0, Build 2657.15112
Core: Running on .NET Framework Version 2.0.50727
Scripts: Compiling C# scripts...failed (4 errors, 0 warnings)
Errors:
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/WhereExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/DistinctExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/LimitExtension.cs:
CS1706: Line 9: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/SortExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
Error:
System.NullReferenceException: A null value was found where an object instance was required.
at System.TermInfoDriver.ReadKeyInternal () [0x00000]
at System.TermInfoDriver.ReadKey (Boolean intercept) [0x00000]
at System.ConsoleDriver.ReadKey (Boolean intercept) [0x00000]
at System.Console.ReadKey (Boolean intercept) [0x00000]
at Server.Core.Main (System.String[] args) [0x00000]
which libraries must installed on system to start server??? maybe I missed something? |
|
|
|
|
|
#42 (permalink) |
|
Forum Novice
|
Greetings,
SysError - I am only guessing at this point... 1) Make sure you have UO installed using WINE. 2) Make sure script/datapath.cs is point to your hidden WINE folder with the UO path. Code:
private const string CustomPath = @".wine/cdrv/Program Files/Ultima Online";
__________________
|
|
|
|
|
|
#43 (permalink) |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
I had change the code in that files
DistinctExtension.cs LimitExtension.cs SortExtension.cs WhereExtension.cs for example after Code:
public sealed class DistinctExtension : BaseExtension
{
Code:
public delegate DistinctExtension DEDelegateType(); DEDelegateType DEDelegate = new DEDelegateType(DistinctExtension And after that this error has disappeared Code:
usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/WhereExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/DistinctExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/LimitExtension.cs:
CS1706: Line 9: Anonymous methods are not allowed in attribute declaration
+ /usr/home/uo/TEST/Scripts/Commands/Generic/Extensions/SortExtension.cs:
CS1706: Line 11: Anonymous methods are not allowed in attribute declaration
Scripts: One or more scripts failed to compile or no script files were found.
but I have new errors... Code:
RunUO - [www.runuo.com] Version 2.0, Build 2657.41040 Core: Running on .NET Framework Version 2.0.50727 Scripts: Compiling C# scripts...Error: System.Exception: Compiler failed to produce the assembly. Stderr=' ** ERROR **: file class.c: line 1912 (mono_class_setup_vtable_general): should not be reached aborting... ', Stdout=' at slot 52: System.Collections.Generic.ICollection<T>.get_IsReadOnly (48) overrides get_IsReadOnly (1) at slot 52: System.Collections.Generic.IList<T>.RemoveAt (33) overrides RemoveAt (4) at slot 52: System.Collections.Generic.IList<T>.Insert (32) overrides Insert (3) at slot 52: System.Collections.Generic.ICollection<T>.Remove (53) overrides Remove (6) at slot 52: System.Collections.Generic.ICollection<T>.Add (49) overrides Add (2) at slot 52: System.Collections.Generic.ICollection<T>.Clear (50) overrides Clear (3) no implementation for interface method System.Collections.Generic.ICollection`1::CopyTo(Int32[2][],int) in class .InternalArray`1 METHOD .ctor() METHOD System.Collections.Generic.ICollection<T>.get_IsReadOnly() METHOD get_Count() METHOD get_Item(int) METHOD set_Item(int,System.Int32[2]) METHOD System.Collections.Generic.IList<T>.RemoveAt(int) METHOD System.Collections.Generic.IList<T>.Insert(int,System.Int32[2]) METHOD System.Collections.Generic.ICollection<T>.Remove(System.Int32[2]) METHOD System.Collections.Generic.ICollection<T>.Add(System.Int32[2]) METHOD System.Collections.Generic.ICollection<T>.Clear() METHOD GetEnumerator() METHOD Contains(System.Int32[2]) METHOD CopyTo(System.Int32[2][],int) METHOD IndexOf(System.Int32[2]) METHOD GetGenericValueImpl(int,System.Int32[2]&) ' at Mono.CSharp.CSharpCodeCompiler.CompileFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at Mono.CSharp.CSharpCodeCompiler.CompileAssemblyFromFileBatch (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromFile (System.CodeDom.Compiler.CompilerParameters options, System.String[] fileNames) [0x00000] at Server.ScriptCompiler.CompileCSScripts (Boolean debug, Boolean cache, System.Reflection.Assembly& assembly) [0x00000] at Server.ScriptCompiler.Compile (Boolean debug, Boolean cache) [0x00000] at Server.Core.Main (System.String[] args) [0x00000] This exception is fatal, press return to exit ** (/home/uo/TEST/runuo.exe:95380): WARNING **: exception inside UnhandledException handler: Cannot cast from source type to destination type. Please, RavonTUS, upload working emulator, plz. I am tired.... |
|
|
|
|
|
#44 (permalink) |
|
Forum Novice
|
Greetings,
Agh, what a mess. There is a new version of the Linux distro I use and RunUO has made a big jump in versions. My personal schedule is a little busy this week, so bare with me. I will again attempt to update everything over the next two weeks. -Ravon
__________________
|
|
|
|
|
|
#45 (permalink) | ||
|
Forum Novice
|
Quote:
Quote:
Are you trying to compile the program on a Windows PC and then run it on a Linux PC? Try compiling it on the Linux PC and avoid the Windows PC completely. -Ravon
__________________
|
||
|
|
|
|
|
#47 (permalink) |
|
Forum Newbie
|
Here's RunUO 2.0 svn181 built on Ubuntu server (feisty) with the Mono JIT compiler version 1.2.3.1.
RunUO 2.0 svn181 built by Linux for Linux |
|
|
|
|
|
#48 (permalink) |
|
Newbie
Join Date: Aug 2005
Age: 24
Posts: 41
|
[RunUO 2.0 Svn][OSI] Mondain's Legacy to use this system I need to compile ultima.dll Ultima SDK Converted to 2.0 can you compile from sources to ultima.so??? it will be very useful fo |