Explaining some .cs code (SQL-related)

Place for sharing your game modifications for Life is Feudal: Your Own

Kevinn
 
Posts: 10
Joined: 23 Sep 2016, 01:38

Explaining some .cs code (SQL-related)

Post by Kevinn » 07 Nov 2016, 16:54

This is some code from a online players mod released somewhere on this forum.
Code: Select all
$BARON_nullObj = new SimObject();
function BARON_sqlNullCallback(%rs)
{
      //echo("CALLBACK: " @ %rs);
}
 
function BARON_sqlExecute(%sql)
{
      // echo("QUERY: " @ %sql);
       %s = dbi.Query($BARON_nullObj,BARON_sqlNullCallback,%sql);
      dbi.remove(%s);
}


How does this Query work? Can I do a select statement and pull data from the database? I tried echoing the callback and it returns a callback number it seems.

I am trying to pull values from the local database and use them in some code, how would I go about doing that?


Kevinn
 
Posts: 10
Joined: 23 Sep 2016, 01:38

Re: Explaining some .cs code (SQL-related)

Post by Kevinn » 08 Nov 2016, 02:35

I pretty much just need to know a method of doing a select query and having it return data to use in the script, if that is possible.

Return to Game mods

cron