[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] |
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_INT, 11, true);
SL::AddTableEntry(handle, "p_kill", SL_TYPE_INT, 11, true); ////the key
SL::AddTableEntry(handle, "P_money", SL_TYPE_INT, 11, true);/////the key
SL::AddTableEntry(handle, "p_death", SL_TYPE_INT, 11, true);/////the key
SL::AddTableEntry(handle, "p_name", SL_TYPE_VCHAR, 24);
SL::AddTableEntry(handle, "p_password", SL_TYPE_VCHAR, 64);
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");
}