logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Persistant Object not work ?

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules
View previous topic :: View next topic  
Author Message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Sun Jan 20, 2008 19:57    Post subject: Persistant Object not work ? Reply with quote

Hello, i have made a long break in the nwn developpement and last time, the Get/SetPersistentObject wasn't implemented

Today i don't know if it work or not but i use this script for a persistant chest
Code:
void LoadCoffreContent(object oCoffre)
{
   int coffreId = GetLocalInt(oCoffre, "database_id");
   if (coffreId == 0) {
      return;
   }
     string sSQL;
     sSQL = "/*lps_coffre_inc-LoadCoffreContent*/ "+
               "SELECT cof_item "+
               "FROM lps_coffre_contenu "+
               "WHERE cof_id = "+IntToString(coffreId)+
               " ORDER BY cof_item_id";
     SetLocalString(GetModule(), "NWNX!SQL!SETSCORCOSQL", sSQL);
     object oItem = RetrieveCampaignObject("NWNX","-",GetLocation(oCoffre),oCoffre);
     while (GetIsObjectValid(oItem))
     {
       oItem = RetrieveCampaignObject("NWNX", "FETCHMODE", GetLocation(oCoffre), oCoffre);
     }
    
  }


in the nwnx log file i retreive all other queries, but the ones using "NWNX!SQL!SETSCORCOSQL" seem to not be intercepted by nwnx4

do i something wrong, or someone success to implement a solution using alternative method (wich one) or is it always impossible actually

PS: i'have looked for the Gryphyn's Vendor System and see that he doesn't use "NWNX!SQL!SETSCORCOSQL" but "NWNX!ODBC!SETSCORCOSQL" but after searching for this plugins it seem that it is for nwnx2 and not nwnx4, i'm right ?
Thank you
Back to top
View user's profile Send private message
Gryphyn



Joined: 20 Jan 2005
Posts: 431

PostPosted: Sun Jan 20, 2008 22:45    Post subject: Reply with quote

Set/Get Object are (as yet) not included in NWNX4.
There is an 'alternative' nwnx4 that allows you to use 'original' style plugins in NWNX4, this may help.

However it's still a mute point as GetFirst/GetNext NWScripting functions in NWN2 don't work properly for inventories yet.

Cheers
Gryphyn
Back to top
View user's profile Send private message
amphiprion



Joined: 07 Nov 2006
Posts: 44
Location: Toulouse (France)

PostPosted: Sun Jan 20, 2008 23:19    Post subject: Reply with quote

Thanks for yous reply, so i will wait the implementation of the functionnality.

in waiting, no persistent chest :'(
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Scripts and Modules All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group