Jump to content
  • 0
Sign in to follow this  
Oceanid

Too many columns, discarding last 1 column [Solved]

Question

I made a script to look up a players account information but it only works when I type in my own character name. For anyone else the map server displays the "Too many columns, discarding last 1 column" error. It can't seem to find the account id so it defaults to 0 and can't pull any of the account information. Anyone know why this is?

 

This is the bit of code that checks for a matching account id in the db:

 

if(!query_sql("SELECT `account_id` FROM `login` WHERE `account_id` ='"+getcharid( 3,.@name$ )+"'")) {
		mes "[Account Manager]";
		mes "There is no character matching " +.@name$+ ".";
		mes "Would you like to re-enter the name?";
		switch(select("Yes:No")) {
			case 1:
				callsub CHARACTER;
				next;
			case 2:
				close;
		}
	}

 

Edited by Oceanid

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

query_sql requires you to pass variables for every coloumn that you want selected. so try 

if(!query_sql("SELECT account_id ...",.@accountId)) { // parse };

Share this post


Link to post
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
Answer this question...

×   Pasted as rich text.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.