View previous topic :: View next topic |
Author |
Message |
wizard341
Joined: 19 Dec 2006 Posts: 15
|
Posted: Mon Jan 01, 2007 20:59 Post subject: |
|
|
Oh ok - I didn't realize that was the log file to look at. Well good news, I found the output! Here is a sampling of what I see
Code: | * Buffer content: NumOfPortalsCyllaMeadowsBAGA2BKA
* Plugin DoRequest(0x4c16fe8, EXEC, SELECT val FROM pwdata WHERE player='~' AND tag='' AND name='NumOfPortalsCyllaMeadowsBAGA2BKA')
* Buffer content: SELECT val FROM pwdata WHERE player='~' AND tag='' AND name='NumOfPortalsCyllaMeadowsBAGA2BKA'
* Plugin DoRequest(0x4c16fe8, FETCH, )
* Buffer content:
* Plugin DoRequest(0x4c16fe8, SET_ESCAPE_STRING, NumOfPortalsCyllaMeadowsBAGA2BKA)
* Buffer content: NumOfPortalsCyllaMeadowsBAGA2BKA
* Plugin DoRequest(0x4c16fe8, GET_ESCAPE_STRING, ................................................................................................................................)
* Buffer content: NumOfPortalsCyllaMeadowsBAGA2BKA
* Plugin DoRequest(0x4c16fe8, EXEC, SELECT val FROM pwdata WHERE player='~' AND tag='' AND name='NumOfPortalsCyllaMeadowsBAGA2BKA')
* Buffer content: SELECT val FROM pwdata WHERE player='~' AND tag='' AND name='NumOfPortalsCyllaMeadowsBAGA2BKA'
* Plugin DoRequest(0x4c16fe8, FETCH, )
* Buffer content:
* Plugin DoRequest(0x4c16fe8, SET_ESCAPE_STRING, Portal0CyllaMeadowsBAGA2BKA)
* Buffer content: Portal0CyllaMeadowsBAGA2BKA
* Plugin DoRequest(0x4c16fe8, GET_ESCAPE_STRING, ................................................................................................................................)
* Buffer content: NWNX!SQL!GET_ESCAPE_STRING
* Plugin DoRequest(0x4c16fe8, SET_ESCAPE_STRING, portal_start)
* Buffer content: portal_start
* Plugin DoRequest(0x4c16fe8, GET_ESCAPE_STRING, ................................................................................................................................)
* Buffer content: portal_start
* Plugin DoRequest(0x4c16fe8, EXEC, SELECT player FROM pwdata WHERE player='~' AND tag='' AND name='NWNX!SQL!GET_ESCAPE_STRING')
* Buffer content: SELECT player FROM pwdata WHERE player='~' AND tag='' AND name='NWNX!SQL!GET_ESCAPE_STRING'
* Plugin DoRequest(0x4c16fe8, FETCH, )
* Buffer content:
* Plugin DoRequest(0x4c16fe8, EXEC, INSERT INTO pwdata (player,tag,name,val,expire) VALUES('~','','NWNX!SQL!GET_ESCAPE_STRING','portal_start',0))
* Buffer content: INSERT INTO pwdata (player,tag,name,val,expire) VALUES('~','','NWNX!SQL!GET_ESCAPE_STRING','portal_start',0)
* Plugin DoRequest(0x4c16fe8, SET_ESCAPE_STRING, NumOfPortalsCyllaMeadowsBAGA2BKA)
* Buffer content: NumOfPortalsCyllaMeadowsBAGA2BKA
* Plugin DoRequest(0x4c16fe8, GET_ESCAPE_STRING, |
The code that is controlling this is as follows...
Code: | void main()
{
object oPC = GetLastUsedBy();
//-------------------------------------
//Set this stone for use and start up
//the conversation
//-------------------------------------
if(!hasAlreadyActivatedPortal(oPC,OBJECT_SELF))
{
int iNumberOfPortals = GetPersistentInt(GetModule(),"NumOfPortals" + CreateUniquePlayerID(oPC));
string sPortalVar = "Portal" + IntToString(iNumberOfPortals) + CreateUniquePlayerID(oPC);
SetPersistentString(GetModule(),sPortalVar , GetTag(OBJECT_SELF));
FloatingTextStringOnCreature("A new portal location, " + GetName(OBJECT_SELF) + ", has become available for your use.",oPC,FALSE);
iNumberOfPortals++;
SetPersistentInt(GetModule(),"NumOfPortals" + CreateUniquePlayerID(oPC),iNumberOfPortals);
}
BeginConversation("wiz_portal_conv",oPC);
}
int hasAlreadyActivatedPortal(object oPC, object oPortal)
{
int iNumberOfPortals = GetPersistentInt(GetModule(),"NumOfPortals" + CreateUniquePlayerID(oPC));
//---------------------------------------------
//Search through all of the portals for the tag
//of the portal passed in
//---------------------------------------------
int i = 0;
string sPortalTag = GetTag(oPortal);
for(i; i < iNumberOfPortals; i++)
{
string sPortalStoredTag = GetPersistentString(GetModule(),"Portal" + IntToString(i) + CreateUniquePlayerID(oPC));
if(sPortalTag == sPortalStoredTag)
{
//we found the portal stored already
return TRUE;
}
}
//Guess we didn't find it here
return FALSE;
} |
with
Code: | string CreateUniquePlayerID(object oPlayer)
{
string sPlayerName = GetFirstName(oPlayer) + GetLastName(oPlayer) + GetPCPublicCDKey(oPlayer);
return sPlayerName;
} |
|
|
Back to top |
|
|
wizard341
Joined: 19 Dec 2006 Posts: 15
|
Posted: Tue Jan 09, 2007 3:15 Post subject: |
|
|
Just a quick bump - any chance to look at this? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue Jan 09, 2007 12:12 Post subject: |
|
|
I haven't forgotten about you, just been busy the last few days.
The problem can be seen in this line:
Code: | * Buffer content: NWNX!SQL!GET_ESCAPE_STRING |
I do not know where this comes from, currently, but it might have something to do with NWN2 reusing memory space that was used in previous requests. Do you think you could create a test script (or module) that produces the same error ? It would speed things up considerably if I could reproduce the problem on my PC. _________________ Papillon |
|
Back to top |
|
|
wizard341
Joined: 19 Dec 2006 Posts: 15
|
Posted: Tue Jan 09, 2007 20:58 Post subject: |
|
|
Ok - sure thing . I noticed the same thing actually... I figured it was an issue not with the specific command & data I was calling, rather it was a sequence of the commands I was using. |
|
Back to top |
|
|
wizard341
Joined: 19 Dec 2006 Posts: 15
|
Posted: Wed Jan 10, 2007 7:12 Post subject: |
|
|
Alright, I can send you the module, or if you want you can just make it yourself. It's pretty darn simple.
On module load I have this
Code: |
#include "nwnx_sql"
void main()
{
SQLExecDirect("CREATE TABLE IF NOT EXISTS pwdata (player varchar(64) NOT NULL default ' ',tag varchar(64) NOT NULL default ' ',name varchar(256) NOT NULL default ' ',val varchar(64),expire smallint(5) unsigned default NULL,last timestamp(14) NOT NULL,PRIMARY KEY (player,tag,name)) TYPE=MyISAM;");
ExecuteScript("x2_mod_def_load", OBJECT_SELF);
} |
Then I have a placeable that is set to usable. On the 'On Used' of that placeable, I have this section of code
Code: |
#include "nwnx_sql"
void main()
{
object oPC = GetLastUsedBy();
string sPortalVar = "blah" + IntToString(1) + GetFirstName(oPC) + GetLastName(oPC) + GetPCPublicCDKey(oPC);
SetPersistentString(GetModule(),sPortalVar, "a");
}
|
That should produce the error. |
|
Back to top |
|
|
mostal
Joined: 29 Apr 2005 Posts: 60
|
Posted: Wed Jan 10, 2007 10:57 Post subject: |
|
|
I retrieve same error NWNX!SQL!GET_ESCAPE_STRING in request when character number exceed 24 characters
ex:
string srequete= SELECT * FROM PW_DATA WHERE tag='Ange Noir de La Misericorde'
WriteTimeStamp(srequete) retrieve:
SELECT * FROM PW_DATA WHERE tag=NWNX!SQL!GET_ESCAPE_STRING
BUT with less than 25 characters
string srequete= SELECT * FROM PW_DATA WHERE tag='Ange de La Misericorde'
WriteTimeStamp(srequete) retrieve:
SELECT * FROM PW_DATA WHERE tag='Ange de La Misericorde' |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Thu Feb 01, 2007 17:31 Post subject: |
|
|
I suppose this bug should be fixed with prototype 1.07. Please confirm . _________________ Papillon |
|
Back to top |
|
|
Grinning Fool
Joined: 12 Feb 2005 Posts: 264
|
Posted: Thu Feb 01, 2007 20:31 Post subject: |
|
|
No longer seeing this in 1.07 _________________ Khalidine, a NWN2 persistent world
Looking for volunteers. |
|
Back to top |
|
|
wizard341
Joined: 19 Dec 2006 Posts: 15
|
Posted: Fri Feb 02, 2007 3:53 Post subject: |
|
|
Yup - bug is gone |
|
Back to top |
|
|
|
|
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
|