PDA

View Full Version : RunUO and C#


MrBored
September 9th, 2003, 05:07 AM
Just wondering if any of you are familiar with RunUO ( the ultima online emu ) and C#, I'm trying to code a questing engine similair to the one in DAoC. I'm a C++ guy and I'm not entirely sure how C# handles arrays, so far I've found out you neet to declare an array like so:

public int[] MyArray;

But then how do you set the size, does it automatically resize like a vector performing a push_back() or what? I've tried assigning test values to each element and it hasn't crashed yet ;) Need some confirmation on this please.

WhoGivesARatsAss
September 9th, 2003, 05:10 AM
you can go with the new command..

is C# = C sharp.. i dunno abt c sharp yet.. havent worked on it

and if you want to use dynamic stuff.. use a vector..

declare it and then use push_back() and pop (i forget commands damn).. to put values in it!

best is to use an array of objects ofcourse.. once done u can go to the desired index and what not (this u know i assume)..

MrBored
September 9th, 2003, 01:22 PM
yeah, I figured it out, was a syntax problem. Now I just have a problem that is more specific to RunUO, I need to know how to serialize the array so it will be added to a world save. :/