Код:
stock LoadServersConfig()
{
new Year, Month, Day, date[20], date1[20], Hour, Minute, Second;
getdate(Year, Month, Day);
gettime(Hour, Minute, Second);
format(date, sizeof(date), "%d-%02d-%02d",Year,Month,Day);
format(date1, sizeof(date), "%d:%d:%d",Hour,Minute,Second);
strins(server[ond], date, 0);
strins(server[ont], date1, 0);
server[ORMID] = orm_create("server", dbhandle);
orm_addvar_int(server[ORMID], server[session], "session");
orm_addvar_string(server[ORMID], server[ond], 50, "OnD");
orm_addvar_string(server[ORMID], server[ont], 50, "OnT");
orm_addvar_int(server[ORMID], server[ownedb], "ownedb");
orm_addvar_int(server[ORMID], server[maxown], "Cars");
orm_setkey(server[ORMID], "session");
orm_select(server[ORMID], "LoadID", "i", server[session]-1);
//orm_insert(server[ORMID], "LoadID", "", "");
}
forward LoadID(i);
public LoadID(i)
{
orm_addvar_int(server[ORMID], server[ownedb], "ownedb"); // i thinking here to retrieve old data info from old table which session is lover by -1
orm_addvar_int(server[ORMID], server[maxown], "Cars");
orm_insert(server[ORMID], "LoadServersOldInfo", "");
return 1;
}
forward LoadServersOldInfo();
public LoadServersOldInfo()
{
//also i here put printf with maxown and prints me 0 but in old table is 9
orm_update(server[ORMID]);
return 1;
}
So where is problem session retrieves but ownedb and maxown wont. Sorry for Double post mouse stuck on it