Anyone know what happened to vcmp.liberty-unleashed.co.uk? It's only shows blank page.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menufunction PrintSlicer()
{
local PrintBackup = print;
print <- function(string)
{
if(string!=null)
{
string = ""+string+""
if(string.len()>512)
{
local x = string.len()/512;
local cpt = 0;
for(local i = 0; i != x; i++)
{
cpt += 512;
PrintBackup(string.slice(cpt-512, cpt));
}
PrintBackup(string.slice(cpt, (cpt+(string.len()%512))));
PrintBackup("Sliced prints ("+(x+1)+" slices) ");
}
else PrintBackup(string);
}
}
}
How to apply?function onScriptLoad()
{
local table = {};
NewTimer("TimerTest", 1000, 1, table);
}
function TimerTest(table)
{
print(type(table));
print("Testing");
}
But does not happen anything.
function tasks()
{
NewTimer("tasks",60000,1);
local now = date()
if(now.hour.tointeger() == 00)
{
SetWeather( 7 );
}
if(now.hour.tointeger() == 06)
{
OffCarLights();
}
if(now.hour.tointeger() == 18)
{
SetWeather( 5 );
}
if(now.hour.tointeger() == 20)
{
OpenCarLights();
}
}
print("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eie");
function errorlog( str )
{
local hata = "\n[Error]"+str+"\n Functions:\n"
local cs = {};
local now = date();
for(local i = 2; i != null; i++)
{
if(getstackinfos( i ))
{
local fnad = getstackinfos( i );
hata = hata+"["+fnad["func"]+"()] "+fnad["src"]+" ["+fnad["line"]+"]\n";
}
else break;
}
for(local i = 2; i != null; i++)
{
if(getstackinfos( i ))
{
foreach(idx,val in getstackinfos( i ))
cs[idx+i] <- val;
}
else break;
}
hata = hata + "Locals:\n"
for(local i = 2; i != null; i++)
{
if(getstackinfos( i ))
{
local fnad = getstackinfos( i );
foreach(idx,val in cs["locals"+i])
hata = hata+"["+fnad["func"]+"]"+idx+", Value="+val+"\n";
}
else break;
}
print(hata);
mysql_query( YOUR_DB, "INSERT INTO errors (`error`, `date`) VALUES ( '" + mysql_escape_string(YOUR_DB, hata) + "', '" + (now.day + "/" + (now.month.tointeger() + 1) + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec) + "')" );
print( mysql_insert_id(YOUR_DB)+" error saved with this number." );
}
seterrorhandler( errorlog );
CREATE TABLE IF NOT EXISTS `errors` (
`error` text NOT NULL,
`date` text NOT NULL
);
ALTER TABLE errors ADD id INT( 10 ) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;