Raised This Month: $ Target: $400
 0% 

argument type mismatch


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
xfirestorm
Member
Join Date: Mar 2012
Old 02-25-2013 , 08:40   Re: argument type mismatch
Reply With Quote #2

How the...
Anyway, I just tried compiling that sample code and it works...
Well, here is the actual code:
Quote:
public hbID_check(data[1],taskid) {
new id = data[0];
new name[32];
get_user_name(id,name,31);
new old_hbID[32];

strcat(old_hbID,db_check_name_exists(id,name) ,31);
/* ... more code ... */
return 0;
}

public db_check_name_exists(id,name) {
new return_val[32];
new hbID[32];
return_val = "0";
new Sql:conn;
conn = dbi_connect("localhost","user","secret","dev_ db");
new rHandle;
rHandle = dbi_query(conn,"SELECT hbid FROM hbid_store WHERE player_name = '%s'",name);
if(rHandle < 0) {
return_val = "-1";
} else if (rHandle > 0) {
dbi_nextrow(rHandle);
dbi_result(rHandle,"hbid",hbID,31);

dbi_free_result(rHandle);
dbi_close(conn);

return_val = hbID;
}

dbi_close(conn);

return return_val;
}
Error is on this line: strcat(old_hbID,db_check_name_exists(id,name) ,31);

Last edited by xfirestorm; 02-25-2013 at 08:41.
xfirestorm is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:43.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode