Leonidas   
		
			Master 
			   
			
			
 
 
			
	Posts: 277 
	Likes Given: 3
 
Likes Received: 13 in 12 posts 
	Joined: May 2013
	
 Reputation: 1
  
			
 ![]()  
		
	 | 
	
		
			
Mysql account setup 
			 
			
				Was working fine the other day, now when it tries to retrieve the account from my database it gives me this error: 
Code: 
 21:28:DEBUG:__ thread (1000) __ |  # | _____________ function _____________ | __ ticks passed from previous function start __ 
21:28:DEBUG:>>         1000     |  0 |                      CServer::OnTick | +0  
21:28:DEBUG:>>         1000     |  1 |                CServer::OnConsoleCmd | +0  
21:28:DEBUG:>>         1000     |  2 |                      CServer::r_Verb | +0  
21:28:DEBUG:>>         1000     |  3 |                   CScriptObj::r_Call | +0  
21:28:DEBUG:>>         1000     |  4 |             CScriptObj::OnTriggerRun | +0  
21:28:DEBUG:>>         1000     |  5 |                      CServer::r_Verb | +141  
21:28:DEBUG:>>         1000     |  6 |                   CScriptObj::r_Verb | +0 <-- exception catch point (below is guessed and could be incorrect!) 
21:28:DEBUG:>>         1000     |  7 |                        CGFile::Close | +47  
21:28:CRITICAL:(AccountMysql.scp,5)"Access Violation" (0x17bd14), in CScriptObj::Verb() 
21:28:DEBUG:command 'DB.QUERY' args '"SELECT * FROM accounts WHERE status='1' [0208BFF8]
  
I have it so players have to verify their email after creating an account online, when they create the account, the status is 0. Once they verify, the status turns to 1, sphere checks for account with a status of 1 and adds them, then sets the status to 2. Before I added the verification, it was working, but now that I have something seemed to have messed up, or it's something else.
 
It still creates the account, but this error is very annoying and I'd really like to know why it's popping up.
 
Code: 
 [function f_acc_update] 
DB.CONNECT 
    DB.QUERY "SELECT * FROM accounts WHERE status='1'" 
    if (<DB.ROW.NUMROWS> > 0) 
        for R 0 <eval <DB.ROW.NUMROWS>-1> 
            serv.account add <DB.ROW.<eval <LOCAL.R>>.login> <DB.ROW.<eval <LOCAL.R>>.password> 
            DB.EXECUTE "UPDATE accounts SET status='2' WHERE login='<DB.ROW.<eval <LOCAL.R>>.login>'" 
            serv.log MySQL Debug: #<eval <LOCAL.R>> Account <DB.ROW.<eval <LOCAL.R>>.login> has been created! 
        end 
    endif
  
			 
			
			
			
				
(This post was last modified: 12-23-2016 01:42 PM by Leonidas.)
 
				
			 
		 |  
	 
 | 
	| 12-23-2016 01:41 PM | 
	
		
	 | 
	
	
		   
		 
		
	 |