Immusama
Immusama
Explore posts from servers
DHDistant Horizons
Created by Immusama on 10/3/2024 in #help-me
Need some help with settings/quality
My specs: CPU: i7-10700K @ 4.6GHz (stock overclocked) GPU: RTX 3090 TI RAM: 32GB NVME/SSD etc Version: TerraFirmaGreg Minecraft: 1.20.1 DH: 2.1.2-a-1.20.1-forge-fabric No shaders currently with Oculus. I've seen many posts that DH should work even on mid/lower end specs yet whenever I try to increase the quality preset or overall performance settings my game freezes. LOD Render Distance Radius: 192 Quality preset: High and CPU Load Balanced I sit on a comfortable 40-50% CPU and 30-50% GPU. But as soon as I go higher on Quality Preset my game freezes. I didnt change anything else besides what I wrote.
15 replies
CC#
Created by Immusama on 3/14/2023 in #help
✅ Help with SQLite INSERT INTO C#
Hey all, I'm running this code and I don't understand why there is no data being stored in my created table.
using System;
using System.IO;
using System.Text;
using System.Data;
using System.Data.SQLite;

public class CPHInline
{
public bool Execute()
{
// Variables
string path = @"Data Source=C:\Users\Immusama\OneDrive - Critical Fear UG (haftungsbeschränkt)\Database\Twitch.db";
string userId = CPH.GetGlobalVar<string>("userId", true);
string userName = CPH.GetGlobalVar<string>("userName", true);
string displayName = CPH.GetGlobalVar<string>("user", true);
int isSubscribed = CPH.GetGlobalVar<int>("isSubscribed", true);
int isVip = CPH.GetGlobalVar<int>("isVip", true);
int isModerator = CPH.GetGlobalVar<int>("isModerator", true);

SQLiteConnection sql_db = new SQLiteConnection(path);


sql_db.Open();
string sql = "CREATE TABLE Viewers (userId varchar(20), userName varchar(30), displayName varchar(30), isSubscribed int, isVip int, isModerator int)";
SQLiteCommand command = new SQLiteCommand(sql, sql_db);
command.ExecuteNonQuery();


SQLiteCommand sqlInsert = new SQLiteCommand ("INSERT INTO Viewers (userId, userName, displayName, isSubscribed, isVip, isModerator) VALUES (@userId, @userName, @displayName, @isSubscribed, @isVip, @isModerator)", sql_db);
sqlInsert.Parameters.AddWithValue(@"userId", userId);
sqlInsert.Parameters.AddWithValue(@"userName", userName);
sqlInsert.Parameters.AddWithValue(@"displayName", displayName);
sqlInsert.Parameters.AddWithValue(@"isSubscribed", isSubscribed);
sqlInsert.Parameters.AddWithValue(@"isVip", isVip);
sqlInsert.Parameters.AddWithValue(@"isModerator", isModerator);

sql_db.Close();

return true;
}
}
using System;
using System.IO;
using System.Text;
using System.Data;
using System.Data.SQLite;

public class CPHInline
{
public bool Execute()
{
// Variables
string path = @"Data Source=C:\Users\Immusama\OneDrive - Critical Fear UG (haftungsbeschränkt)\Database\Twitch.db";
string userId = CPH.GetGlobalVar<string>("userId", true);
string userName = CPH.GetGlobalVar<string>("userName", true);
string displayName = CPH.GetGlobalVar<string>("user", true);
int isSubscribed = CPH.GetGlobalVar<int>("isSubscribed", true);
int isVip = CPH.GetGlobalVar<int>("isVip", true);
int isModerator = CPH.GetGlobalVar<int>("isModerator", true);

SQLiteConnection sql_db = new SQLiteConnection(path);


sql_db.Open();
string sql = "CREATE TABLE Viewers (userId varchar(20), userName varchar(30), displayName varchar(30), isSubscribed int, isVip int, isModerator int)";
SQLiteCommand command = new SQLiteCommand(sql, sql_db);
command.ExecuteNonQuery();


SQLiteCommand sqlInsert = new SQLiteCommand ("INSERT INTO Viewers (userId, userName, displayName, isSubscribed, isVip, isModerator) VALUES (@userId, @userName, @displayName, @isSubscribed, @isVip, @isModerator)", sql_db);
sqlInsert.Parameters.AddWithValue(@"userId", userId);
sqlInsert.Parameters.AddWithValue(@"userName", userName);
sqlInsert.Parameters.AddWithValue(@"displayName", displayName);
sqlInsert.Parameters.AddWithValue(@"isSubscribed", isSubscribed);
sqlInsert.Parameters.AddWithValue(@"isVip", isVip);
sqlInsert.Parameters.AddWithValue(@"isModerator", isModerator);

sql_db.Close();

return true;
}
}
31 replies
CC#
Created by Immusama on 3/13/2023 in #help
❔ How do I store data properly?
So I'm streaming on Twitch and I have a program called Streamer.Bot which allows me to use C# to execute code. I have a very basic and limited understanding about C# and coding in general ~ what I'm trying to do is store my viewers data in specific categories I define myself. The main problem I'm having is understanding how to store the acquired data into a file (I haven't figured out another way yet, either .txt, .csv or .ini). An example how I'm imagining it: .ini file is named after my viewer's username in a folder with all the others:
[section1]
key1="value"
key2="value"

[section2]
key1="value"
key2="value"
[section1]
key1="value"
key2="value"

[section2]
key1="value"
key2="value"
I wanna be able to read it and override specific keys if I so desire. (Most of it is automatic) To sum it up, I know how to write it into a file but I don't know how to format it properly and check for specific sections and key+values and override them.
7 replies