Tag mismatches
#1

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.
Reply
#2

Use mysql_fetch_float instead.
Reply
#3

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.
Reply
#4

I think I probably can't script.

Okay, check that your using Float:
Reply
#5

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
Reply
#6

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

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

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.
Reply
#8

I mean:

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

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

};

new sInfo[MAX_SPAWNS][tSpawn];
Reply
#10

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.
-_-
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)