- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
Looking to add a random name into a string, but not exactly sure how to do it.. I was thinking something like this:
But clearly doesn't work haha..
Not really sure what I'm doing with this one..
C#:
private static string FormatName()
{
switch (Utility.Random(3))
{
default:
case 0:
return "Name1";
break;
case 1:
return "Name2";
break;
case 2:
return "Name3";
break;
}
}
C#:
case 1: ItemID = 0; Name = "String " + FormatName; break;
C#:
error CS0019: Operator '+' cannot be applied to operands of type 'string' and 'method group' [C:\ServUO\Scripts\Scripts.csproj]
Not really sure what I'm doing with this one..