SA-MP Forums Archive
Tag mismatches - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tag mismatches (/showthread.php?tid=480284)



Tag mismatches - Shockey HD - 09.12.2013

Whats up?

pawn Код:
mysql_fetch_field_row(savingstring, "PosX"); sInfo[i][sPosX] = floatstr(savingstring);
        mysql_fetch_field_row(savingstring, "PosY"); sInfo[i][sPosY] = floatstr(savingstring);
        mysql_fetch_field_row(savingstring, "PosZ"); sInfo[i][sPosZ] = floatstr(savingstring);
        mysql_fetch_field_row(savingstring, "PosA"); sInfo[i][sPosA] = floatstr(savingstring);
Код:
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1368) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1369) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1370) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1371) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Warnings.



Re: Tag mismatches - Dokins - 09.12.2013

Use mysql_fetch_float instead.


Re: Tag mismatches - Shockey HD - 09.12.2013

That didn't help

pawn Код:
mysql_fetch_float(savingstring, "PosX"); sInfo[i][sPosX] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosY"); sInfo[i][sPosY] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosZ"); sInfo[i][sPosZ] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosA"); sInfo[i][sPosA] = floatstr(savingstring);
pawn Код:
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1368) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1368) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1369) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1369) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1370) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1370) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1371) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1371) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.



Re: Tag mismatches - Dokins - 09.12.2013

I think I probably can't script.

Okay, check that your using Float:


Re: Tag mismatches - Patrick - 09.12.2013

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
That didn't help

pawn Код:
mysql_fetch_float(savingstring, "PosX"); sInfo[i][sPosX] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosY"); sInfo[i][sPosY] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosZ"); sInfo[i][sPosZ] = floatstr(savingstring);
        mysql_fetch_float(savingstring, "PosA"); sInfo[i][sPosA] = floatstr(savingstring);
pawn Код:
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1368) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1368) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1369) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1369) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1370) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1370) : warning 213: tag mismatch
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1371) : error 035: argument type mismatch (argument 1)
C:\Users\Odysseus\Documents\SAMP\Akthar Deathmatch\gamemodes\atd.pwn(1371) : warning 213: tag mismatch
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Use how to use the right parameter of mysql_fetch_float I suggest you use sscanf whlist loading floats I often use sscanf when loading float, Note: I am writing you a sscanf version of loading float


Re: Tag mismatches - Shockey HD - 09.12.2013

Quote:
Originally Posted by Dokins
Посмотреть сообщение
I think I probably can't script.

Okay, check that your using Float:
I am using float in phpmyadmin


Re: Tag mismatches - Patrick - 09.12.2013

Quote:
Originally Posted by Shockey HD
Посмотреть сообщение
I am using float in phpmyadmin
Here's a sample of loading float using sscanf, make sure you also define your variables with Float:

pawn Код:
new _QuerySize[ 256 ], PlayerName[ 24 ];
GetPlayerName( playerid, PlayerName, sizeof( PlayerName) );
format( _QuerySize, sizeof( _QuerySize ), "SELECT * FROM `you_table_here` WHERE`Username` = '%s'", PlayerName); // formats the query for "mysql_query"
mysql_query( _QuerySize ); // queries the "query" Variable.
mysql_store_result( ); // stores the result from query
if( mysql_num_rows( ) )
while( mysql_fetch_row( _QuerySize ,"|" ) ) // splits the row
{
    sscanf( _QuerySize, "p<|>e<ffff>", sInfo[i][sPosX], sInfo[i][sPosY], sInfo[i][sPosZ], sInfo[i][sPosA]); //sscanf separates the data from the variable
}
I suggest you start using cache or orm version.


Re: Tag mismatches - Dokins - 09.12.2013

I mean:

pawn Код:
Float: sPosX, sPosY,sPosZ, sPosA;



Re: Tag mismatches - Shockey HD - 09.12.2013

pawn Код:
enum tSpawn
{
    Name[32],
    float:sPosX,
    float:sPosY,
    float:sPosZ,
    float:sPosA,
    sTeam,
    Inte,
    sVW,
    sSkin

};

new sInfo[MAX_SPAWNS][tSpawn];



Re: Tag mismatches - Patrick - 09.12.2013

Incorrect
pawn Код:
enum tSpawn
{
    Name[32],
    float:sPosX,
    float:sPosY,
    float:sPosZ,
    float:sPosA,
    sTeam,
    Inte,
    sVW,
    sSkin

};
new sInfo[MAX_SPAWNS][tSpawn];
Correct
pawn Код:
enum tSpawn
{
    Name[32],
    Float:sPosX,
    Float:sPosY,
    Float:sPosZ,
    Float:sPosA,
    sTeam,
    Inte,
    sVW,
    sSkin

};
new sInfo[MAX_SPAWNS][tSpawn];
Note: Case Sensitive

Код:
This forum requires that you wait 240 seconds between posts. Please try again in 110 seconds.
-_-