Author Topic: ERROR TMI Help needed  (Read 907 times)

Legacy_CID-78

  • Sr. Member
  • ****
  • Posts: 261
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #15 on: August 03, 2011, 02:35:09 pm »


               I went through the functions again and you didn't post the end of "GetMD5Hash" there must be more to it then the MD5 loop. it's just not big enough to cause TMI. You would need a hugh string for it.

a faster loop would look like this:

string SQLEncodeSpecialChars(string sString)
{
   int i, len;
   string sReturn = "";
   string sRemains = sString;
   int nPos = FindSubString(sString, "~");

   while(nPos != -1)
   {
       sReturn += GetStringLeft(sRemains,nPos);
       sReturn += "'";
       len = GetStringLength(sRemains);
       sRemains = GetStringRight(sRemains,len - nPos - 1);
       nPos = FindSubString(sRemains, "~");
   }
   sReturn += sRemains;
   return sReturn;
}
I haven't tested it but it should work. you do a simialr loop for decode.
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #16 on: August 04, 2011, 03:45:26 pm »


               Are you running NWNX2 correctly with the MySQL / SQLite database? I've run into TMI errors when I accidentally run my module in single player mode (I.E: Without NWNX2 running)

If you haven't changed anything in aps_include I'd check on your installation of NWNX2 because that code is just fine.
               
               

               
            

Legacy_G0000fy

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #17 on: August 05, 2011, 04:27:34 pm »


               ive tried running the server both with and without NWNX2 but same errors either way. Ill look into that..

And CID, I should try testing your script that u posted, shall i just delete the old "string" and replace it with that then?
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #18 on: August 05, 2011, 04:37:23 pm »


               It'd help if you posted your NWNX2.ini file. Make sure you delete any confidential information such as your database password though. It's possible there's a setting that's messed up in there.

Which database are you using? MySQL, SQLite, or something else?
               
               

               
            

Legacy_G0000fy

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #19 on: August 05, 2011, 04:54:53 pm »


               MySQL i think, but cant find the .ini file:S
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #20 on: August 05, 2011, 05:05:15 pm »


               It's in your NWN directory. If it's not there, that might be the cause of your issues.

This is an example of mine:


; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command
; line take precedence.

[NWNX]
ServerPort = 5124
ModuleName = "MyModule"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = no
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5

[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
;source = sqlite
;file   = sqlite.db

; Use these two settings for ODBC connections
;source = odbc
;dsn    = nwn

; Use these five settings for MySQL connections
source = mysql
server = localhost
user   = root
pwd    = nwn
db     = nwn

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true

[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack

[CHAT]
chat_script=fky_chat
server_script=fky_chat_srv

[FIXES]

copy_vars = 1            # Copy local variables on stack split and on store transaction,
                        # fire OnDisturbed when you merge a stack from a placeable


compare_vars = 1                # If set to 1, items with different local vars don't stack

keep_hidden_in_conversation = 0  # If set to 1, creatures don't unhide when they start a conversation

hp_limit = -10           # Negative HP limit - values up to -127 are allowed
hide_charlist_levels = 1
hide_charlist_dms = 1
hide_charlist_portraits = 0

[FUNCS]
Last_Skill_Number=28             #Last_Skill_Number is the id of the last skill in skills.2da
debugLevel=1              #debugLevel: 1 should only show basic information, 2 should include errors and 3 should log pretty much everything
HOOK_CustomTrapGeometry=1

;Hook for a new OnPlayerLeave event which runs before OnClientLeave
;Makes it possible to retrieve information about the player object as usual (GetName, GetArea, etc)
;In the onplayerleaving script, OBJECT_SELF is the player object about to leave
HOOK_OnPlayerLeaving=1
OnPlayerLeavingScript=mod_on_leaving

[EVENTS]
event_script=nwnx_events
log=1
DownloadCharacter=1
PickPocket=1
Attack=1
ExamineItem=1
ExamineCreature=1
ExaminePlaceable=1
ExamineDoor=1
ToggleMode=1
StealthMode=1
DevastatingCritical=0
UnPolymorph=0
TrapTrigger=0
EndDialog=0
RemoveSanctuary=0

[TMI]
Limitlevel=4
Unlimited=0

               
               

               
            

Legacy_G0000fy

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #21 on: August 05, 2011, 05:07:32 pm »


               Ah here it is:

; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command
; line take precedence.

[NWNX]
ServerPort = 5121
ModuleName = "Epic_Nordock_V2036_RC1"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = yes
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5

[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
source = sqlite
file   = sqlite.db

; Use these two settings for ODBC connections
;source = odbc
;dsn    = nwn

; Use these five settings for MySQL connections
;source = mysql
;server = localhost
;user   = nwn
;pwd    = nwn
;db     = nwn

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true

[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack
[TMI]
Unlimited=0
Limitlevel=8
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #22 on: August 05, 2011, 05:15:40 pm »


               Ok, you're set up for SQLite. But that shouldn't cause the TMI error. It looks like it's set up correctly.

Nevermind me then! It's probably something else '<img'>
               
               

               
            

Legacy_G0000fy

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #23 on: August 05, 2011, 05:22:17 pm »


               Darn '<img'>
               
               

               
            

Legacy_G0000fy

  • Newbie
  • *
  • Posts: 44
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #24 on: August 05, 2011, 05:23:04 pm »


               How do i change to MySQL instead? can try if that works
               
               

               
            

Legacy_zunath

  • Full Member
  • ***
  • Posts: 152
  • Karma: +0/-0
ERROR TMI Help needed
« Reply #25 on: August 05, 2011, 05:39:00 pm »


               Use this instead:

; NWNX2 configuration file
; These are the default values for NWNX2. Values specified on the command
; line take precedence.

[NWNX]
ServerPort = 5121
ModuleName = "Epic_Nordock_V2036_RC1"
WatchdogProcess = yes
UpdateIntervalProcess = 5
WatchdogGamespy = yes
UpdateIntervalGamespy = 20
GamespyRetries = 5
OldGamespyProtocol = no
RestartDelay = 5

[ODBC2]
; Log file
MaxLogSize = 512 ; in KByte
LogLevel = 2 ; 0=nothing, 1=only errors, 2=everything

; Use these two settings for the SQLite internal database
;source = sqlite
;file = sqlite.db

; Use these two settings for ODBC connections
;source = odbc
;dsn = nwn

; Use these five settings for MySQL connections
source = mysql
server = localhost
user = nwn
pwd = nwn
db = nwn

; Set hookscorco to false if you want to disable hooking of
; StoreCampaignObject and RetrieveCampaignObject entirely
hookscorco = true

[PROFILER]
MaxLogSize = 512 ; in KByte
LogLevel = 1 ; 1=overall statistics, 2=full script callstack
[TMI]
Unlimited=0
Limitlevel=8


Just change user to the name you use to log into MySQL. It might just be root.

Then you need to change pwd to the password you chose.