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
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with MySQL
Author Message
DartHVirS
Apprentice
*

Posts: 21
Likes Given: 1
Likes Received: 1 in 1 posts
Joined: Mar 2010
Reputation: 0



Post: #1
Problem with MySQL
Hello,

I have the following code that works good, it updates the table successfully, but there are errors in the console.

The code is:

Code:
[FUNCTION f_estadisticasDB]
if ( <DB.connected> )
DB.QUERY "SELECT account, player, uid, oro, auocoins, puntos, karma, fama, kills, killsnpc, deaths, str, dex, inte FROM estadisticas WHERE uid='<src.uid>'"
    if (<DB.ROW.NUMROWS> > 0)
        DB.EXECUTE "UPDATE estadisticas SET oro='<src.gold>', auocoins='<eval <src.account.tag.auocoins>>', puntos='<eval <src.tag.puntos>>', karma='<src.karma>', fama='<src.fame>', kills='<src.kills>', killsnpc='<eval <src.tag.killsnpc>>', deaths='<src.deaths>', str='<src.str>', dex='<src.dex>', inte='<src.int>' WHERE uid = '<src.uid>'"
    else
        DB.EXECUTE "INSERT INTO estadisticas (account, player, uid, oro, auocoins, puntos, karma, fama, kills, killsnpc, deaths, str, dex, inte) VALUES('<src.account.name>', '<src.name>', '<src.uid>', '<src.gold>', '<eval <src.account.tag.auocoins>>', '<eval <src.tag.puntos>>', '<src.karma>', '<src.fame>', '<src.kills>', '<eval <src.tag.killsnpc>>', '<src.deaths>', '<src.str>', '<src.dex>', '<src.int>')"
    endif
endif

The error messages on sphere console are:

05:03:CRITICAL:(estadisticasDB.scp,12)"Access Violation" (0x103a14), in CScriptObj::Verb()
05:03:DEBUG:command 'DB.QUERY' args '"SELECT account, player, uid, oro, auocoins, puntos, karma, fama, kills, killsnpc, deaths, str, dex, inte FROM estadisticas WHERE uid='0153e4'' [0C9FD5BC]
05:03:DEBUG:__ thread (1864) __ | # | _____________ function _____________ | __ ticks passed from previous function start __
05:03:DEBUG:>> 1864 | 0 | CWorld::OnTick | +0
05:03:DEBUG:>> 1864 | 1 | CGObList::DeleteAll | +16
05:03:DEBUG:>> 1864 | 2 | CClient::CharDisconnect | +0
05:03:DEBUG:>> 1864 | 3 | CChar::OnTrigger | +0
05:03:DEBUG:>> 1864 | 4 | CScriptObj::OnTriggerScript | +0
05:03:DEBUG:>> 1864 | 5 | CScriptObj::OnTriggerRunVal | +0
05:03:DEBUG:>> 1864 | 6 | CScriptObj::OnTriggerRun | +0
05:03:DEBUG:>> 1864 | 7 | CChar::r_Verb | +0
05:03:DEBUG:>> 1864 | 8 | CClient::r_Verb | +0
05:03:DEBUG:>> 1864 | 9 | CScriptObj::r_Verb | +0
05:03:DEBUG:>> 1864 | 10 | CChar::r_Verb | +0
05:03:DEBUG:>> 1864 | 11 | CObjBase::r_Verb | +0
05:03:DEBUG:>> 1864 | 12 | CScriptObj::r_Call | +0
05:03:DEBUG:>> 1864 | 13 | CScriptObj::OnTriggerRun | +0
05:03:DEBUG:>> 1864 | 14 | CScriptObj::OnTriggerRun | +0
05:03:DEBUG:>> 1864 | 15 | CChar::r_Verb | +0
05:03:DEBUG:>> 1864 | 16 | CObjBase::r_Verb | +31
05:03:DEBUG:>> 1864 | 17 | CScriptObj::r_Verb | +0 <-- exception catch point (below is guessed and could be incorrect!)
05:03:DEBUG:>> 1864 | 18 | CGFile::Close | +0
05:03:DEBUG:command 'DB.QUERY' args '"SELECT account, player, uid, oro, auocoins, puntos, karma, fama, kills, killsnpc, deaths, str, dex, inte FROM estadisticas WHERE uid='0153e4'' [0C9FD5BC]

Anybody has a clue what is happening here?

THank you.
(This post was last modified: 01-13-2018 03:12 AM by DartHVirS.)
01-13-2018 03:11 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Problem with MySQL - DartHVirS - 01-13-2018 03:11 AM
RE: Problem with MySQL - darksun84 - 01-13-2018, 03:25 AM
RE: Problem with MySQL - DartHVirS - 01-13-2018, 03:52 AM
RE: Problem with MySQL - DartHVirS - 01-13-2018, 02:16 PM
RE: Problem with MySQL - Coruja - 01-15-2018, 06:02 PM
RE: Problem with MySQL - Kanibal - 01-16-2018, 06:46 AM
RE: Problem with MySQL - Coruja - 01-19-2018, 06:06 AM
RE: Problem with MySQL - DartHVirS - 01-19-2018, 07:49 AM
RE: Problem with MySQL - invernizzi - 01-20-2018, 10:15 PM

Forum Jump:


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