SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 28/11/2010, 10:20 AM   #1
Jony_King
Little Clucker
 
Join Date: Jul 2010
Posts: 22
Reputation: 0
Default warning 213: tag mismatch

Hey,


where is my fault?

pawn Code:
stock GetMyInt(Table[],Field[],Bed[],Bed2[]) //by Jony v1.0
{
    return strval(GetMyString(Table,Field,Bed,Bed2)); //warning here!!
}
Jony_King is offline  
Old 28/11/2010, 10:23 AM   #2
LarzI
High-roller
 
LarzI's Avatar
 
Join Date: Apr 2007
Location: Norway
Posts: 2,628
Reputation: 136
Default Re: warning 213: tag mismatch

Show us GetMyString?
__________________


NEW: [FS] Simple Cellphones

if( strfind( title, "REP", true ) != -1 )
{________________________________________
Sigh();__________________________
}________________________________________


LarzI is offline  
Old 28/11/2010, 10:25 AM   #3
Jony_King
Little Clucker
 
Join Date: Jul 2010
Posts: 22
Reputation: 0
Default Re: warning 213: tag mismatch

pawn Code:
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;
}
Jony_King is offline  
Old 28/11/2010, 10:33 AM   #4
XePloiT
Huge Clucker
 
XePloiT's Avatar
 
Join Date: Nov 2010
Posts: 299
Reputation: 0
Default Re: warning 213: tag mismatch

instead of converting which is not working for ya... just do another function
pawn Code:
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);
}
__________________
You can find me as "AlExEy" in other forums and places.
"Sex is always the answer, it's never a question,'Cause the answer is yes"
Code:
[ r? ] - 0% [ rAdmin + rBank ] - 99% [ rVehHouse - rHouse + rVehicle ] - 99% [ rWeapon + rExp ] - 5% [ rClan ] - 50% The Whole [ rSystem ] - 63% 100% Dynamic & 100% MySql Database Why 99%? - Cuz Nothin' is Perfect. Releases: rVote - Voting/Poll Script

XePloiT is offline  
Old 28/11/2010, 10:35 AM   #5
Retardedwolf
High-roller
 
Retardedwolf's Avatar
 
Join Date: Jun 2009
Posts: 1,468
Reputation: 60
Default Re: warning 213: tag mismatch

Quote:
Originally Posted by XePloiT View Post
instead of converting which is not working for ya... just do another function
pawn Code:
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
Retardedwolf is offline  
Old 28/11/2010, 10:40 AM   #6
XePloiT
Huge Clucker
 
XePloiT's Avatar
 
Join Date: Nov 2010
Posts: 299
Reputation: 0
Default Re: warning 213: tag mismatch

my bad... i forgot to change the Function name...
__________________
You can find me as "AlExEy" in other forums and places.
"Sex is always the answer, it's never a question,'Cause the answer is yes"
Code:
[ r? ] - 0% [ rAdmin + rBank ] - 99% [ rVehHouse - rHouse + rVehicle ] - 99% [ rWeapon + rExp ] - 5% [ rClan ] - 50% The Whole [ rSystem ] - 63% 100% Dynamic & 100% MySql Database Why 99%? - Cuz Nothin' is Perfect. Releases: rVote - Voting/Poll Script

XePloiT is offline  
Old 28/11/2010, 10:42 AM   #7
Jony_King
Little Clucker
 
Join Date: Jul 2010
Posts: 22
Reputation: 0
Default Re: warning 213: tag mismatch

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.
Jony_King is offline  
Old 28/11/2010, 10:52 AM   #8
XePloiT
Huge Clucker
 
XePloiT's Avatar
 
Join Date: Nov 2010
Posts: 299
Reputation: 0
Default Re: warning 213: tag mismatch

if this is float you need different code
pawn Code:
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 :\
__________________
You can find me as "AlExEy" in other forums and places.
"Sex is always the answer, it's never a question,'Cause the answer is yes"
Code:
[ r? ] - 0% [ rAdmin + rBank ] - 99% [ rVehHouse - rHouse + rVehicle ] - 99% [ rWeapon + rExp ] - 5% [ rClan ] - 50% The Whole [ rSystem ] - 63% 100% Dynamic & 100% MySql Database Why 99%? - Cuz Nothin' is Perfect. Releases: rVote - Voting/Poll Script

XePloiT is offline  
Old 28/11/2010, 11:02 AM   #9
Jony_King
Little Clucker
 
Join Date: Jul 2010
Posts: 22
Reputation: 0
Default Re: warning 213: tag mismatch

Nope same warning at the return ^^ .D
Jony_King is offline  
Old 28/11/2010, 11:03 AM   #10
JaTochNietDan
High-roller
 
JaTochNietDan's Avatar
 
Join Date: Apr 2007
Location: Republic of Ireland
Posts: 2,502
Reputation: 363
Default Re: warning 213: tag mismatch

Quote:
Originally Posted by XePloiT View Post
if this is float you need different code
pawn Code:
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 Code:
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.
__________________
Releases:
[Includes]: [jBan] | [jBanLite]
[Plugins]: [FileManager] | [Execute]
[Applications]: [Remote Administrator *NEW] | [Script King] | [RCON GUI]
JaTochNietDan is offline  
 

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Warning 213] Tag Mismatch Mujib Help Archive 5 01/05/2010 11:49 AM
[Help] Warning 213: Tag Mismatch cembry90 Help Archive 5 14/01/2010 01:52 PM
[HELP] i have one warning [tag mismatch] can help me? akis_tze Help Archive 2 03/01/2010 09:58 PM
warning 213: tag mismatch pierhs Help Archive 2 02/01/2010 08:49 AM
warning 213: tag mismatch ғαιιοцт Help Archive 0 23/02/2009 05:20 PM


All times are GMT. The time now is 07:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.