Jump to content
MakeWebGames

Create user problem


iR00T

Recommended Posts

QUERY ERROR: Column count doesn't match value count at row 1

Query was INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, creditcard) VALUES( 'NPC', '12132123', md5('3213232'), 10, 12211, 0, 0, 0, 30, 30, 100, 100, 23, 23, 550, 550, 1, 'Male', unix_timestamp(), '3232132', -1)

 

i get that when i try to create a user on my game :S...well i added credit card but as you see it adds tat info in right ther ei mean on the create user thing it dont say Creditcard: how much xD so would that be the problem even tho the code says -1 at the end...?

Link to comment
Share on other sites

Re: Create user problem

There's 22 of these:

username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, creditcard

And 21 of these:

'NPC', '12132123', md5('3213232'), 10, 12211, 0, 0, 0, 30, 30, 100, 100, 23, 23, 550, 550, 1, 'Male', unix_timestamp(), '3232132', -1

Somewhere, you missed a value. Hence the column count error. ;)

Link to comment
Share on other sites

Re: Create user problem

I looked through and it seems you're missing the default credit card. Location is there, after maxhp.

I'd use this:

'NPC', '12132123', md5('3213232'), 10, 12211, 0, 0, 0, 30, 30, 100, 100, 23, 23, 550, 550, 1, 'Male', unix_timestamp(), '3232132', -1, -1

or whatever you want the default credit card amount to be.....most likely -1.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...