Tag Mismatch Mayhem
Typical of me, i'm knock for my "TMM"'s.
Ok let's see about 40 tag mismatch errors in 1000 lines of code. I know it's good practice to split your plugins into multiple files, but I realy can't work like that. What I want to know is, what realy causes this error, as I don't want to have to post my code in here as it took me a while and I don't plan for an un-compiled release. |
I believe that tag mismatches happen when you give a function parameters of the wrong type.
|
Everyone seems to confuse this...That's argument mismatch I think.
|
Oh, I thought arg mismatch is when you pass it the wrong number of arguments.
|
Nope.
|
Here is what causes a tag mismatch exactly:
Code:
Let's examine this code... Line1: var1 has the Float tag. Numbers in the form of x.y have the Float tag too. So this assignment works. Line2: var2 has no tag. Numbers in the form of x have no tag too. This assignment works too. Line3: var2 has no tag, but var1 has Float tag. This causes a tag mismatch. Basically, tag mismatches are errors. That is, if you assign a float to an int like this, you get a garbage result. Use the floatround() (or float() to do it the other way round) function instead of simply assigning. |
Well the problem is kinda focused around every time I do a mysql command.
Ok let me get an exaaaaamppppleeeee: format(query,255,"SELECT job_name,job_pay FROM jobs WHERE jobid='%s'",job_id_res); query_store = dbi_query(mysql,query); dbi_nextrow(query_store) dbi_field(query_store, 1, job_name_res, 31); dbi_field(query_store, 2, job_pay_res, 31); Every time I use a query_store thingy it gives me an error. and all I do is new query_store in each public thingy() |
| All times are GMT -4. The time now is 17:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.