warning 213: tag mismatch
#1

Hey,


where is my fault?

pawn Код:
stock GetMyInt(Table[],Field[],Bed[],Bed2[]) //by Jony v1.0
{
    return strval(GetMyString(Table,Field,Bed,Bed2)); //warning here!!
}
Reply
#2

Show us GetMyString?
Reply
#3

pawn Код:
stock GetMyString(Table[],Field[],Bed[],Bed2[]) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%s'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return myquery;
}
Reply
#4

instead of converting which is not working for ya... just do another function
pawn Код:
stock GetMyInt(Table[],Field[],Bed[],Bed2) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%d'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return strval(myquery);
}
Reply
#5

Quote:
Originally Posted by XePloiT
Посмотреть сообщение
instead of converting which is not working for ya... just do another function
pawn Код:
stock GetMyString(Table[],Field[],Bed[],Bed2) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%d'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return strval(myquery);
}
Wouldn't that be a variable instead of using GetMyString why not just GetMyInt
Reply
#6

my bad... i forgot to change the Function name...
Reply
#7

The warning must be in the stock GetMyFloat. It is for my mysql system. But i dont know my fault. Your solutions just get me more errors.
Reply
#8

if this is float you need different code
pawn Код:
stock GetMyFloat(Table[],Field[],Bed[],Float:Bed2) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%f'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return floatstr(myquery);
}
this is your script im just converting it :\
Reply
#9

Nope same warning at the return ^^ .D
Reply
#10

Quote:
Originally Posted by XePloiT
Посмотреть сообщение
if this is float you need different code
pawn Код:
stock GetMyFloat(Table[],Field[],Bed[],Float:Bed2) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%f'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return floatstr(myquery);
}
this is your script im just converting it :\
It should be
pawn Код:
stock Float:GetMyFloat(Table[],Field[],Bed[],Float:Bed2) //by Jony v1.0
{
    new query[128],myquery[128];
    format(query,sizeof(query),"SELECT %s FROM %s WHERE %s = '%f'", Field,Table,Bed,Bed2);
    mysql_query(query);
    mysql_store_result();
    mysql_fetch_row(myquery);
    mysql_free_result();
    return floatstr(myquery);
}
Since it's returning a float.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)