SA-MP Forums Archive
error. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error. (/showthread.php?tid=640569)



error. - asri - 04.09.2017

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]




Re: error. - coool - 04.09.2017

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


Re: error. - asri - 04.09.2017

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");
        } 



Re: error. - Meller - 04.09.2017

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


Re: error. - asri - 04.09.2017

the compiler not show any warning.but the number not updating


Re: error. - Arbico - 04.09.2017

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