error.
#1

in my log server, it show this.

Quote:

[19:42:31] [SQLITE] - NOTICE: Successfully connected to database info server.db!
[19:42:31] [SQLITE] - ERROR: (SL::AddTableEntry) A primary field was created already. There can only be one primary field! [Key p_kill]
[19:42:31] [SQLITE] - ERROR: (SL::AddTableEntry) A primary field was created already. There can only be one primary field! [Key P_money]
[19:42:31] [SQLITE] - ERROR: (SL::AddTableEntry) A primary field was created already. There can only be one primary field! [Key p_death]

Reply
#2

Post code looks like you are making every thing as PRIMARY.
Reply
#3

PHP код:
if(!SL::ExistsTable("players"))
        {
            new 
handle SL::Open(SL::CREATE"players"); //Opening a valid handle to create a table called 'players'
            
SL::AddTableEntry(handle"p_id"SL_TYPE_INT11true);
                
SL::AddTableEntry(handle"p_kill"SL_TYPE_INT11true); ////the key
                
SL::AddTableEntry(handle"P_money"SL_TYPE_INT11true);/////the key
                
SL::AddTableEntry(handle"p_death"SL_TYPE_INT11true);/////the key
            
SL::AddTableEntry(handle"p_name"SL_TYPE_VCHAR24);
            
SL::AddTableEntry(handle"p_password"SL_TYPE_VCHAR64);
            
SL::AddTableEntry(handle"p_score"SL_TYPE_INT);
            
SL::AddTableEntry(handle"p_posx"SL_TYPE_FLOAT);
            
SL::AddTableEntry(handle"p_posy"SL_TYPE_FLOAT);
            
SL::AddTableEntry(handle"p_posz"SL_TYPE_FLOAT);
            
SL::Close(handle);//Closing the previous opened handle.
            
print("Table 'players' was successfully created");
        } 
Reply
#4

SL::AddTableEntry(handle, "p_kill", SL_TYPE_INT, 11, false); ////the key
SL::AddTableEntry(handle, "P_money", SL_TYPE_INT, 11, false);/////the key
SL::AddTableEntry(handle, "p_death", SL_TYPE_INT, 11, false);/////the key

https://github.com/ThreeKingz/easy-s...asy-sqlite.inc
Reply
#5

the compiler not show any warning.but the number not updating
Reply
#6

I think it's not updating because it's already made, Try deleting the table and trying again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)