View previous topic :: View next topic |
Author |
Message |
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Wed Jan 02, 2008 0:55 Post subject: |
|
|
I'll see what else you need to cope with a VS2008 build.
Visual Studio 2008 - vcredist
Guessing it has some extra stuff over the VS2005 version.
Cheers
Gryphyn |
|
Back to top |
|
|
Clisair
Joined: 27 Jun 2006 Posts: 9
|
Posted: Wed Jan 02, 2008 21:38 Post subject: |
|
|
Sorry, but if I have to install all this and all that then your plugin is not going to work. To me the deffinition of a plugin is that you just plug it in. I don't recall anything being said that so much would be needed to just run a dll file with nwnx2.
Since this is not going to work, could you point me in the direction of being able to do this with scripting and sqlite?
*sigh*
I really need another scripter to help.... _________________ Firinn Of Elisair
http://www.elisair.com/ |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Thu Jan 03, 2008 12:06 Post subject: |
|
|
I was on holidays, so didn't check this during the last week.
I don't want to sound ungrateful (I am not, I understand you are busy) but Clisair has a point about plugins not going well with additional installs. I can't use your work either now, simply because I don't have install rights on our server. I doubt I am the only one not having his own rig running the game.
I guess the reason I didn't spot this with the first version of the new plugin is me having installed Visual C++ 2005 when testing it, and removing most of that before I checked out the next one. |
|
Back to top |
|
|
Gryphyn
Joined: 20 Jan 2005 Posts: 431
|
Posted: Thu Jan 03, 2008 16:07 Post subject: |
|
|
Yeah, I appreciate that...
It'll be 12-18 months before commercial/open source applications appear using the latest Visual Studio offerings. - then you'll HAVE the redist packs installed, or you'll have an installer do it.
I've got to move (move with) my Dev team, so no choice on the upgrades.
This is one of the many reasons why I've supplied my source - Anyone can retro-fit it to their own needs. Unfortunately there are not too many active developers visiting the boards.
This code/functionality is also slated to be included in the official 'Time' plugin. I don't know how far off that release is.
Cheers
Gryphyn |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Thu Jan 03, 2008 16:19 Post subject: |
|
|
The preferred VS version for NWNX2 development is VS 6.0.
I couldn't recompile it with VS 6.0 because it's using wxWidgets.
BTW, the base class definition is incorrect. The base class in NWNX2 is CNWNXBase. |
|
Back to top |
|
|
Disco
Joined: 06 Dec 2006 Posts: 152
|
Posted: Mon Jan 07, 2008 12:23 Post subject: |
|
|
Anyway, is there a way to get it working without installing a lot of extra stuff? Isn't it possible to import the libs in your plugin? I guess most people would mind a big dll less than a install puzzle, really. |
|
Back to top |
|
|
milliorn
Joined: 03 Jun 2006 Posts: 29
|
Posted: Sat Apr 05, 2008 9:57 Post subject: |
|
|
THANK YOU for putting this available. I got it to work with an without the Redistribution Package. I been wanting something like this for a while, an thought I show my appreciation for it I did encounter the problems posted on this thread, but careful reading got me through it Downloading the Package is not really a problem imo for the gain. |
|
Back to top |
|
|
hedgehog
Joined: 05 Jun 2008 Posts: 2
|
Posted: Thu Jun 05, 2008 18:06 Post subject: Solution for SQLite |
|
|
I'm using SQLite, too. And had trouble with this. But it's really simple, at the end.
Code: |
// This works fine with SQLite:
string sDate;
string sSQL = "SELECT datetime('now','localtime')";
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_SUCCESS)
sDate = SQLGetData(1);
else
sDate = "Database error";
// Don't know if MySQL has the function datetime. So try to get the time in another way, if datetime not worked.
// _Should_ work with MySQL, operating system independent.
if(sDate == "Database error")
{
sSQL = "SELECT CURRENT_TIMESTAMP";
SQLExecDirect(sSQL);
if(SQLFetch() == SQL_SUCCESS)
sDate = SQLGetData(1);
else
sDate = "Database error");
}
|
You get the Timestamp in the string sDate, with which you can work at your will. I'm only using this to set the correct Moduletime/-date corresponding to the realworld-date in the OnModuleLoad.
You have to include "aps_include", of course.
It's a 24h-format: sDate = "YYYY-MM-DD HH:MM:SS". Don't know what's given back in countries which are not using the international time-format (e.g. the US), but should be the same anywhere.
The Realtime plugin is much more comfortable. But its not suitable where you cannot install on or running a non Windows-Server.
The strange thing is, aps/nwnx includes current_timestamp in it's defined functions for SQLite. But it's saved as a string with the content "current_timestamp" in the database. *wonder* Maybe it's a problem with newer versions of SQLite ODBC drivers. |
|
Back to top |
|
|
|