View previous topic :: View next topic |
Author |
Message |
Massocre
Joined: 26 Feb 2005 Posts: 2
|
Posted: Sat Feb 26, 2005 8:41 Post subject: Problem Creating Table |
|
|
Hi:
I run a PW that I wanna add persistance too using NWNx2 and MySQL. I decided to add a "player owned housing system" by f0wl Cr0w, which creates tables as players buy the houses. When testing, the nwnx2_odbc log gave me this error:
NWNX ODBC2 plugin V.0.9.2.4
(c) 2005 by Ingmar Stieger (Papillon) and Jeroen Broekhuizen
visit us at http://www.nwnx.org
o Logfile maximum size limit is: 524288 bytes
o Log level: Everything will be logged.
o Using MySQL connection.
o Hooking SCO....hooked at 5c4320
o Hooking RCO....hooked at 5c4200
o Connect successful.
o Got request: SELECT ResRef FROM hearthdaleplayerhousing WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Got request: SELECT Facing FROM hearthdaleplayerhousing WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Got request: SELECT ResRef FROM shack_a1 WHERE FurnID='00000'
o Got request: UPDATE hearthdaleplayerhousing SET Facing='' WHERE FurnID='00000'
! SQL Error: Table 'nwn.hearthdaleplayerhousing' doesn't exist
o Disconnecting from database.
Can someone possibly help me out with understanding what is wrong? |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sat Feb 26, 2005 10:59 Post subject: |
|
|
It seems that your table is not yet been made. I assume you know what the SELECT statement does, it wants to fetch data from a table that does not exist. So, you must first create the table in your nwn database. |
|
Back to top |
|
|
Massocre
Joined: 26 Feb 2005 Posts: 2
|
Posted: Sat Feb 26, 2005 11:10 Post subject: |
|
|
Well, the idea is that the tables make themselves from the mod. When i went to MySQL control panel, I saw the new table it made (called shack_a1) but no info was stored....
If I have to make the table manually, what one to make? "hearthdaleplayerhousing"? How do I do that exactly? I can do fair scripting, but this DB stuff is very new. |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Sun Feb 27, 2005 10:39 Post subject: |
|
|
As far as I can tell, the shack_a1 table was not the one you were refering to in the first post (hearthdaleplayerhousing). Also, SQL doesn't create tables on itself. You must create a statement like:
Code: | CREATE TABLE hearthdaleplayerhousing ( owner TEXT(100), ... ) |
Otherwise no table is created, and you can never store or retreive information from that database. |
|
Back to top |
|
|
|