Someone
Участник
- Сообщения
- 1,933
- Реакции
- 1,653
L 06/04/2016 - 23:09:51: [SM] Native "SQL_FetchInt" reported: Error fetching data from field 4
L 06/04/2016 - 23:09:51: [SM] Displaying call stack trace for plugin "dlvltime.smx":
L 06/04/2016 - 23:09:51: [SM] [0] Line 107, C:\csgo\1.7\addons\sourcemod\scripting\dlvltime.sp::SQL_TimeCallback()
Как эту ошибку исправить?
L 06/04/2016 - 23:09:51: [SM] Displaying call stack trace for plugin "dlvltime.smx":
L 06/04/2016 - 23:09:51: [SM] [0] Line 107, C:\csgo\1.7\addons\sourcemod\scripting\dlvltime.sp::SQL_TimeCallback()
Как эту ошибку исправить?
PHP:
public SQL_TimeCallback(Handle:owner, Handle:hndl, const String:error[], any:Datapack){
if(hndl == INVALID_HANDLE)
{
LogError("[ABp™] Query Fail: %s", error);
PrintToServer(error);
return;
}
ResetPack(Datapack);
new iClient = ReadPackCell(Datapack);
CloseHandle(Datapack);
if(!SQL_HasResultSet(hndl) || SQL_GetRowCount(hndl) ==0)
{
ShowTopTime(iClient);
return;
}
new time;
new hours;
new minutes;
if(SQL_HasResultSet(hndl) && SQL_FetchRow(hndl))
{
time = SQL_FetchInt(hndl,4);
hours = RoundToFloor(time/3600.0);
time = time-(hours*3600);
minutes = RoundToFloor(time/60.0);
time = time-(minutes*60);
CGOPrintToChat(iClient, "[{RED}ABp™{DEFAULT}] {BLUE}Ваше время на проекте{DEFAULT}:{LIME} %d:%d:%d",hours,minutes,time);
}
}