have a problem with emulator plus orginal.

modshot

New Member
Feb 20, 2014
5
0
i was trying to make a r63b retro with this /watch?v=4Flb-CwfuL8 .
but when i start the emulator i get this error

how do i fix it? my user is not named daniel. its "pc" do i need to change this? how do i do it? thx.
 
 

Attachments

  • Untitled.png
    Untitled.png
    52.5 KB · Views: 12

flyest

Doctor
Mar 3, 2013
94
13
i was trying to make a r63b retro with this /watch?v=4Flb-CwfuL8 .
but when i start the emulator i get this error

how do i fix it? my user is not named daniel. its "pc" do i need to change this? how do i do it? thx.
 
Post line 82 in ItemManager.cs
 

modshot

New Member
Feb 20, 2014
5
0
on line 82:
height = Convert.ToDouble(dRow[6]);



line 38-103

if (ItemData != null)
{
uint id;
int spriteID;
string publicName;
string itemName;
string type;
int width;
int length;
double height;
bool allowStack;
bool allowWalk;
bool allowSit;
bool allowRecycle;
bool allowTrade;
bool allowMarketplace;
bool allowGift;
bool allowInventoryStack;
InteractionType interactionType;
int cycleCount;
string vendingIDS;
string[] ToggleHeight = null;
bool StackMultiplier;
bool sub;
int effect;
int flatId;

foreach (DataRow dRow in ItemData.Rows)
{
try
{
id = Convert.ToUInt32(dRow[0]);
spriteID = (int)dRow[10];
publicName = (string)dRow[1];
itemName = (string)dRow[2];
type = (string)dRow[3].ToString();
width = (int)dRow[4];
length = (int)dRow[5];
if (dRow[6].ToString().Contains(";"))
{
ToggleHeight = dRow[6].ToString().Split(';');
height = Convert.ToDouble(ToggleHeight[0]);
}
else
height = Convert.ToDouble(dRow[6]);

allowStack = Convert.ToInt32(dRow[7]) == 1;
allowWalk = Convert.ToInt32(dRow[9]) == 1;
allowSit = Convert.ToInt32(dRow[8]) == 1;
allowRecycle = Convert.ToInt32(dRow[11]) == 1;
allowTrade = Convert.ToInt32(dRow[12]) == 1;
allowMarketplace = Convert.ToInt32(dRow[13]) == 1;
allowGift = Convert.ToInt32(dRow[14]) == 1;
allowInventoryStack = Convert.ToInt32(dRow[15]) == 1;
interactionType = InterractionTypes.GetTypeFromString((string)dRow[16]);
cycleCount = (int)dRow[17];
vendingIDS = (string)dRow[18];
sub = SilverwaveEnvironment.EnumToBool(dRow[22].ToString());
effect = (int)dRow[23];
StackMultiplier = SilverwaveEnvironment.EnumToBool(dRow[21].ToString());
flatId = (int)dRow["flat_id"];
Item item = new Item(id, spriteID, publicName, itemName, type, width, length, height, allowStack, allowWalk, allowSit, allowRecycle, allowTrade, allowMarketplace, allowGift, allowInventoryStack, interactionType, cycleCount, vendingIDS, sub, effect,StackMultiplier, ToggleHeight,flatId);

Items.Add(id, item);
}
 

flyest

Doctor
Mar 3, 2013
94
13
on line 82:
height = Convert.ToDouble(dRow[6]);



line 38-103

if (ItemData != null)
{
uint id;
int spriteID;
string publicName;
string itemName;
string type;
int width;
int length;
double height;
bool allowStack;
bool allowWalk;
bool allowSit;
bool allowRecycle;
bool allowTrade;
bool allowMarketplace;
bool allowGift;
bool allowInventoryStack;
InteractionType interactionType;
int cycleCount;
string vendingIDS;
string[] ToggleHeight = null;
bool StackMultiplier;
bool sub;
int effect;
int flatId;

foreach (DataRow dRow in ItemData.Rows)
{
try
{
id = Convert.ToUInt32(dRow[0]);
spriteID = (int)dRow[10];
publicName = (string)dRow[1];
itemName = (string)dRow[2];
type = (string)dRow[3].ToString();
width = (int)dRow[4];
length = (int)dRow[5];
if (dRow[6].ToString().Contains(";"))
{
ToggleHeight = dRow[6].ToString().Split(';');
height = Convert.ToDouble(ToggleHeight[0]);
}
else
height = Convert.ToDouble(dRow[6]);

allowStack = Convert.ToInt32(dRow[7]) == 1;
allowWalk = Convert.ToInt32(dRow[9]) == 1;
allowSit = Convert.ToInt32(dRow[8]) == 1;
allowRecycle = Convert.ToInt32(dRow[11]) == 1;
allowTrade = Convert.ToInt32(dRow[12]) == 1;
allowMarketplace = Convert.ToInt32(dRow[13]) == 1;
allowGift = Convert.ToInt32(dRow[14]) == 1;
allowInventoryStack = Convert.ToInt32(dRow[15]) == 1;
interactionType = InterractionTypes.GetTypeFromString((string)dRow[16]);
cycleCount = (int)dRow[17];
vendingIDS = (string)dRow[18];
sub = SilverwaveEnvironment.EnumToBool(dRow[22].ToString());
effect = (int)dRow[23];
StackMultiplier = SilverwaveEnvironment.EnumToBool(dRow[21].ToString());
flatId = (int)dRow["flat_id"];
Item item = new Item(id, spriteID, publicName, itemName, type, width, length, height, allowStack, allowWalk, allowSit, allowRecycle, allowTrade, allowMarketplace, allowGift, allowInventoryStack, interactionType, cycleCount, vendingIDS, sub, effect,StackMultiplier, ToggleHeight,flatId);

Items.Add(id, item);
}
Replace line 82 with this
Code:
height = double.Parse(dRow[6].ToString());
Also, check if table 'furniture' has 'stack_height'. If so, what type is it and where is it (1,2,3..)?
 

whatsgoingon

New Member
Sep 8, 2015
1
0
Hi, i had the same problem. I debugged and realized the stack height in database was in format 'x.x' (a dot notation floating point number) which is not a valid format to be parsed from. It should be 'x,x'. I changed that stack_height value with a regex function to the ',' format. Okay so maybe this was not the best idea, because i don't know if the dot is important elsewhere, but ill find that out soon
 

Users who are viewing this thread

Top