DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • December 18, 2018, 10:21:45 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: Adding starting favor new players  (Read 3266 times)
0 Members and 1 Guest are viewing this topic.
ShadowRaven
Mod God
*****
Offline Offline

Posts: 805


Silence is a virtue...


View Profile WWW
« on: October 28, 2005, 09:26:29 PM »

I am trying to have new accounts start out with X amount of favor(Admin configurable)  to help them out a bit.....

I added this to the $setup = array in configuration.php:

"newplayerstartfavor"=>"Amount of favor to start a new character with,int",

then I added to the create.php right next to the ".getsetting("newplayerstartgold",50):

".getsetting("newplayerstartfavor",0).",

But something can't be right because when I try making a character I get this :

Column count doesn't match value count at row 1
Call Stack:
1: db_query("INSERT INTO accounts ...") called from /home/....../......./testlotgd/create.php on line 186


did I miss doing something??
Logged

Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #1 on: October 28, 2005, 09:29:51 PM »

Did you remember to add deathpower to the SQL INSERT, as well as the values? Make sure they are lined up in the same position as well.

Code:
$sql = "INSERT INTO " . db_prefix("accounts") . "
                  (name, superuser, title, password, sex, login, laston, uniqueid, lastip, gold, deathpower, emailaddress, emailvalidation, referer)
                  VALUES
                  ('$title $shortname', '".getsetting("defaultsuperuser",0)."', '$title', '$dbpass', '$sex', '$shortname', '".date("Y-m-d H:i:s",strtotime("-1 day"))."', '".$_COOKIE['lgi']."', '".$_SERVER['REMOTE_ADDR']."', ".getsetting("newplayerstartgold",50).",",getsetting("newplayerstartfavor",0).", '$email', '$emailverification', '$referer')";
« Last Edit: October 28, 2005, 09:30:40 PM by Sichae » Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

ShadowRaven
Mod God
*****
Offline Offline

Posts: 805


Silence is a virtue...


View Profile WWW
« Reply #2 on: October 28, 2005, 09:36:45 PM »

no I didn't........I just tried that now, and now I get this:

Unknown column 'favor' in 'field list'
Call Stack:
1: db_query("INSERT INTO accounts ...") called from /home/......./........./......./create.php on line 186

 Shocked
Logged

Sichae
iMod God
SVN Users
Mod God
*
Offline Offline

Posts: 3458


If ya didn't get it by now... you're hopeless...


View Profile WWW
« Reply #3 on: October 28, 2005, 09:37:49 PM »

I said deathpower. Look at the SQL call.
Logged

If you didn't understand anything in the above post, don't try to attempt anything suggested.

ShadowRaven
Mod God
*****
Offline Offline

Posts: 805


Silence is a virtue...


View Profile WWW
« Reply #4 on: October 28, 2005, 09:41:44 PM »

*slaps forehead* ok, my bad.  That worked Smiley thanks for the help!  Cheesy
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
29 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search