OpenNos problem compile

12/02/2020 08:11 FasTeRsKi#1
Hello, i have problem with compile source.
Maybe any get help to me ?
Problem screen: [Only registered and activated users can see links. Click Here To Register...]
Tested on VS 2017 or 2019 and not working.
Import.Console not parse all, after parse "Item" crash.
Error say "System.OverflowException: "The value is too large or too small for the signed byte value.".
I tested a compile and run NosCore and work's without error's...
12/03/2020 12:00 Zro Freaks#2
Quote:
Originally Posted by FasTeRsKi View Post
Hello, i have problem with compile source.
Maybe any get help to me ?
Problem screen: [Only registered and activated users can see links. Click Here To Register...]
Tested on VS 2017 or 2019 and not working.
Import.Console not parse all, after parse "Item" crash.
Error say "System.OverflowException: "The value is too large or too small for the signed byte value.".
I tested a compile and run NosCore and work's without error's...
Run in debug and you give the line error. Probably you only need change 1 byte to a short/int
12/03/2020 19:36 FasTeRsKi#3
Quote:
Originally Posted by Zro Freaks View Post
Run in debug and you give the line error. Probably you only need change 1 byte to a short/int
This problem resolve.

I'm not create a new topic and go quote this topic.
I have a next problem with OpenNos..
Problem with login account on game, not working :/ Not error's
Screen: [Only registered and activated users can see links. Click Here To Register...]
12/29/2020 00:25 nostaleEnthusiast#4
What was the issue? I have the same problem..

npc.DarkResistance = Convert.ToSByte(currentLine[7]);

value is too big or too small error
12/29/2020 00:52 erixor#5
Quote:
Originally Posted by nostaleEnthusiast View Post
What was the issue? I have the same problem..

npc.DarkResistance = Convert.ToSByte(currentLine[7]);

value is too big or too small error
Instead of converting to sbyte, try converting to short or bigger if it still doesn't work. sbyte only goes from -128 to +127 so if a npc has less or more than that, you won't be able to convert it. Using Convert.ToInt16 should work.

You might also have to edit the entity and the DTO and create a migration after that since it's most likely a database entity.

If it still doesn't work, try Convert.ToInt32 but I don't think you'll need it
12/29/2020 02:22 nostaleEnthusiast#6
Quote:
Originally Posted by erixor View Post
Instead of converting to sbyte, try converting to short or bigger if it still doesn't work. sbyte only goes from -128 to +127 so if a npc has less or more than that, you won't be able to convert it. Using Convert.ToInt16 should work.

You might also have to edit the entity and the DTO and create a migration after that since it's most likely a database entity.

If it still doesn't work, try Convert.ToInt32 but I don't think you'll need it
I understood changing the sbyte part, but I'm not sure what to write for migration, could you help?
12/29/2020 07:35 0Lucifer0#7
Quote:
Originally Posted by nostaleEnthusiast View Post
I understood changing the sbyte part, but I'm not sure what to write for migration, could you help?
OpenNos is code first so :
1- change the value in the entity
2 - add-migration Aphrodite
3 - update-database
4 - update the dto
12/29/2020 10:00 Shitoshi#8
Quote:
Originally Posted by FasTeRsKi View Post
This problem resolve.

I'm not create a new topic and go quote this topic.
I have a next problem with OpenNos..
Problem with login account on game, not working :/ Not error's
Screen: [Only registered and activated users can see links. Click Here To Register...]
Did you add account in good db.Account? Did you convert your string password to sha512? [Only registered and activated users can see links. Click Here To Register...]