The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
critical problem
Author Message
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #1
critical problem
i get these lines, like every 10h of server upline..

anyone know whats the problem for it.??

19:08:CRITICAL:Exception, in CServer::Tick() #7 "generic"
19:08:FATAL:Server Unstable: Aborted
19:08:FATAL:Server Unstable: Aborted
19:08:FATAL:Server Unstable: Aborted
19:11:CRITICAL:(wos_functions.scp,736)Exception, in CScriptObj::Verb() #0 ""
19:11:FATAL:(wos_functions.scp,736)Server Unstable: Aborted
19:11:FATAL:(wos_functions.scp,736)Server Unstable: Aborted
19:11:CRITICAL:(wos_functions.scp,736)'Main' thread hang, restarting...
19:11:ERROR:(wos_functions.scp,736)33:Tx Error 0
19:11:FATAL:(wos_functions.scp,736)Server Unstable: Aborted
19:11:FATAL:(wos_functions.scp,736)Server Unstable: Aborted


and the 736 line is
Code:
db.query "SELECT unix_timestamp(now())"

whole function
Code:
[function unix_time]
// vozra6aet unix time stamp
db.query "SELECT unix_timestamp(now())"
if (<db.row.numrows>)
   return <ddb.row.0>
else
   serv.log CRITICAL: Cant get unix time !
   return 0
endif
12-05-2014 04:08 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: critical problem
db.query "SELECT unix_timestamp(now())"
I don't know if this command should work... Your syntax is wrong..

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-05-2014 04:35 AM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #3
RE: critical problem
its working kinda.. in my db it shows like unix_time = 1417404298
12-05-2014 07:29 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
RE: critical problem
Interesting... I though it only works selecting something from tables Big Grin

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-05-2014 08:12 AM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #5
RE: critical problem
this function returns the correct time.. but sadly it crashes ://
12-06-2014 03:46 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #6
RE: critical problem
Hmmm, do you really need this function?
Whats the objective of its usage?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-06-2014 04:28 AM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #7
RE: critical problem
emm yes, i need this because i use it for events..
i will give you a sample of it...
Code:
[function check_ip_event]
//function chechks if players ip has been used in last 15 minutes
//because only 1 ip per char can be on event
db.query "SELECT * FROM `events_ips` WHERE `event`='<argv[0]>' AND `ip`='<account.lastip>';"
if (!<db.row.numrows>)
   // if didn't find, then add ip
   db.execute "INSERT INTO `events_ips` (`event`, `ip`, `time`) VALUES('<argv[0]>', '<account.lastip>', '<unix_time>');"
   return 0
else
   //if found ip, then check if 10 minutes have passed
   local.db_fix = <db.row.0.time>
   local.total = <eval <unix_time> - <local.db_fix>>
   if (<local.total> > 600)
      // if 10 mintes has passed
      db.execute "UPDATE `events_ips` SET `time`=<unix_time> WHERE `event`='<argv[0]>' AND `ip`='<account.lastip>';"
      return 0
   else
      // this ip has been used for last 10 mintes, can't add repeatedly
      return 1
   endif
endif
(This post was last modified: 12-06-2014 05:26 AM by Runcuks.)
12-06-2014 05:25 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #8
RE: critical problem
You can not change <unix_time> to unix_timestamp(now()) ?

Like this?

db.execute "UPDATE `events_ips` SET `time`=unix_timestamp(now()) WHERE `event`='<argv[0]>' AND `ip`='<account.lastip>';"

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-06-2014 05:47 AM
Find all posts by this user Like Post Quote this message in a reply
Runcuks
Journeyman
*

Posts: 179
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Nov 2012
Reputation: 0



Post: #9
RE: critical problem
ofcourse i can, but you think this will solve a problem? if this is the same?
12-06-2014 05:50 AM
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #10
RE: critical problem
Maybe?

STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
12-06-2014 06:00 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)