Error adding commands in the emulator

CodiceZ

New Member
Jul 7, 2017
10
0
I saw in the forum, old commands, especially interested on someone. The command to copy the furni of the rooms and bring them back to a new room.

I transformed into the roomitemhandling file from this line of code:

using (IQueryAdapter dbClient = AskEnvironment.GetDatabaseManager().GetQueryReactor()) { dbClient.RunQuery("UPDATE `items` SET `room_id` = '" + _room.RoomId + "', `x` = '" + Item.GetX + "', `y` = '" + Item.GetY + "', `z` = '" + Item.GetZ + "', `rot` = '" + Item.Rotation + "' WHERE `id` = '" + Item.Id + "' LIMIT 1"); } ]

in

https://pastebin.com/wR9gJZvB

In the Visual Studio's errors, it comes out "session", and it doesn't exist in the current context.


Next I create the copyroom copymodel files and insert the string in CommandManager.cs

this.Register("copiamodel", new CopiaModel()); this.Register("copyroom", new copyroom());

but the error "The type and space name, of the names' CopiaModel, copyroom 'was not found. Probably missing a using directive or an Assembly reference.'
 
Last edited:

Bop

Member
May 28, 2020
58
52
The command was written for an older/newer version of PlusEMU but a simple change from “session” to “Session” should work. Same thing with “RunQuery” > “runQuery”. Just going by memory but don’t change it if it’s not throwing back any errors.
 

Users who are viewing this thread

Top