Jump to content

nvh

Members
  • Posts

    265
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by nvh

  1. I deleted and clone again. These are the only things that I do. pls Can you help me the next step (migration)?
  2. because it belongs to ItemsBase so I don't know how to migration. pls help me in the next step
  3. Can i using Add-Migration -Context GameContext AddingItems
  4. Yep! I make new line like “ public DbSet<ItemBase> Items { get; set; }” but “Items” is “Items_random_stat”. StatVatCong, StatMaCong... are variables like StatGrowth
  5. using Microsoft.EntityFrameworkCore.Migrations; namespace Intersect.Server.Migrations.Game { public partial class AddingItems_random_stat : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_Items", table: "Items"); migrationBuilder.RenameTable( name: "Items", newName: "ItemBase"); migrationBuilder.AddColumn<int>( name: "StatAmor", table: "ItemBase", nullable: false, defaultValue: 0); migrationBuilder.AddColumn<int>( name: "StatMaCong", table: "ItemBase", nullable: false, defaultValue: 0); migrationBuilder.AddColumn<int>( name: "StatSpeed", table: "ItemBase", nullable: false, defaultValue: 0); migrationBuilder.AddColumn<int>( name: "StatVatCong", table: "ItemBase", nullable: false, defaultValue: 0); migrationBuilder.AddPrimaryKey( name: "PK_ItemBase", table: "ItemBase", column: "Id"); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropPrimaryKey( name: "PK_ItemBase", table: "ItemBase"); migrationBuilder.DropColumn( name: "StatAmor", table: "ItemBase"); migrationBuilder.DropColumn( name: "StatMaCong", table: "ItemBase"); migrationBuilder.DropColumn( name: "StatSpeed", table: "ItemBase"); migrationBuilder.DropColumn( name: "StatVatCong", table: "ItemBase"); migrationBuilder.RenameTable( name: "ItemBase", newName: "Items"); migrationBuilder.AddPrimaryKey( name: "PK_Items", table: "Items", column: "Id"); } } }
  6. Thanks very much! my love. I succeeded first time!!! but System.NotSupportedException HResult=0x80131515 Message=SQLite does not support this migration operation ('DropPrimaryKeyOperation'). For more information, see http://go.microsoft.com/fwlink/?LinkId=723262. Source=Microsoft.EntityFrameworkCore.Sqlite StackTrace: at Microsoft.EntityFrameworkCore.Migrations.SqliteMigrationsSqlGenerator.Generate(DropPrimaryKeyOperation operation, IModel model, MigrationCommandListBuilder builder) at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(MigrationOperation operation, IModel model, MigrationCommandListBuilder builder) at Microsoft.EntityFrameworkCore.Migrations.MigrationsSqlGenerator.Generate(IReadOnlyList`1 operations, IModel model) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.GenerateUpSql(Migration migration) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration) at Intersect.Server.Database.DbInterface.InitDatabase(ServerContext serverContext) in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Database\DbInterface.cs:line 250 at Intersect.Server.Core.Bootstrapper.PostContextSetup() in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Core\Bootstrapper.cs:line 227 at Intersect.Server.Core.Bootstrapper.Start(String[] args) in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Core\Bootstrapper.cs:line 55
  7. i am generating random variable like "StatGrowth". can i add it like this?
  8. i read how to migration but i really don't understand. I'm so bad
  9. Microsoft.Data.Sqlite.SqliteException HResult=0x80004005 Message=SQLite Error 1: 'no such column: i.StatVatCong'. Source=Microsoft.Data.Sqlite StackTrace: at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db) at Microsoft.Data.Sqlite.SqliteCommand.<PrepareAndEnumerateStatements>d__62.MoveNext() at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext() at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.<_TrackEntities>d__17`2.MoveNext() at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext() at Intersect.Server.Database.DbInterface.LoadGameObjects(GameObjectType gameObjectType) in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Database\DbInterface.cs:line 704 at Intersect.Server.Database.DbInterface.LoadAllGameObjects() in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Database\DbInterface.cs:line 603 at Intersect.Server.Database.DbInterface.InitDatabase(ServerContext serverContext) in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Database\DbInterface.cs:line 284 at Intersect.Server.Core.Bootstrapper.PostContextSetup() in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Core\Bootstrapper.cs:line 227 at Intersect.Server.Core.Bootstrapper.Start(String[] args) in E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\Core\Bootstrapper.cs:line 55 This exception was originally thrown at this call stack: [External Code] Intersect.Server.Database.DbInterface.LoadGameObjects(Intersect.Enums.GameObjectType) in DbInterface.cs Intersect.Server.Database.DbInterface.LoadAllGameObjects() in DbInterface.cs Intersect.Server.Database.DbInterface.InitDatabase(Intersect.Server.Core.ServerContext) in DbInterface.cs Intersect.Server.Core.Bootstrapper.PostContextSetup() in Bootstrapper.cs Intersect.Server.Core.Bootstrapper.Start(string[]) in Bootstrapper.cs in https://docs.freemmorpgmaker.com/en-US/developer/advanced/database.html#creating-a-migration Tut: Now build your server. Building with the NoFody configuration will generate a bunch of required dlls. Severity Code Description Project File Line Suppression State Error CS1566 Error reading resource 'Intersect.Server.network.handshake.bkey.pub' -- 'Could not find a part of the path 'E:\DuAnGame\Intersect\TV(Delop)\build\nofody\keys\network.handshake.bkey.pub'.' Intersect.Server E:\DuAnGame\Intersect\TV(Delop)\Intersect.Server\CSC 1 Active
  10. then I won't touch the .db file anymore. but if not fix db what should i do with StatVatCong??
  11. Thank you! Thank you! How to edit .db file. Can i add StatVatCong to database?
  12. your ques 1. A text input (like Statbonus range) but it's only random Damage. Besides that, there's nothing else! 2. i don't know how to do that. What is that? 3. one time, but i did ctrl + z line code when debug server.exe public ICollection<string> PendingMigrations => Database?.GetPendingMigrations()?.ToList() ?? new List<string>(); thank you for quest
  13. I want to add a new random stat for item, but get this error. please help me line code when debug server.exe line code when debug server.exe public ICollection<string> PendingMigrations => Database?.GetPendingMigrations()?.ToList() ?? new List<string>(); maybe because the database. I don't know how to fix it!! thank you!
  14. nvh

    Mod??

    thank you so much. Maybe I should start over. hope hope there are tutorials on coding
  15. nvh

    Mod??

    Can i created a new feature from my developer version to intersect by replacing Client.exe, Editor.exe and Server.exe files?? the current version I'm using can't edit the source code!
  16. Pls help me. I use intersect normally, not dev ver
  17. How to make npc hp > 1.000.000 ???
  18. How to Adding Event Commands?? i don’t know how to code? In editor or server https://docs.freemmorpgmaker.com/en-US/developer/advanced/eventcommands.html
  19. there are many good features that intersect does not have. But i love Intersect <3
  20. How to make option after killed (death) Can revival with money?
  21. Intersect using WF or WPF??
  22. I can code C#, i have experience with unity. But to code intersect, I don't know how to start?? do you have a tut? Thank you
  23. I can code C# and Unity
  24. I want to move map, npc, item, spell... data to developer version I want to install the mods. to code more features. What skills do I need to learn? thank you
  25. nvh

    Admin Tool

    How to fix it?? How to give a item for player :))
×
×
  • Create New...