warning 213: tag mismatch
#1

Can't see what the problem is, i originally had this.

Код:
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
    pInfo[playerid][ID] = cache_get_field_content_int(0, "id");
    pInfo[playerid][Admin] = cache_get_field_content_int(0, "admin");
    pInfo[playerid][Tokens] = cache_get_field_content_int(0, "tokens");
    pInfo[playerid][Kills] = cache_get_field_content_int(0, "kills");
    pInfo[playerid][Deaths] = cache_get_field_content_int(0, "deaths");
    pInfo[playerid][Human] = cache_get_field_content_int(0, "human");
    pInfo[playerid][Zombie] = cache_get_field_content_int(0, "zombie");
    pInfo[playerid][Infection] = cache_get_field_content(0, "infection");
    pInfo[playerid][VIP] = cache_get_field_content(0, "vip", "");
    pInfo[playerid][Viptime] = cache_get_field_content(0, "viptime");
    pInfo[playerid][Pos_x] = cache_get_field_content(0, "pos_x");
    pInfo[playerid][Pos_y] = cache_get_field_content(0, "pos_y");
    pInfo[playerid][Pos_z] = cache_get_field_content(0, "pos_z");
    LoggedIn[playerid] = true;

    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid,pInfo[playerid][Tokens]);
    SendClientMessage(playerid, -1, "{FF0000}[ACCOUNT]: {FFFFFF}Successfully logged in.");
    return 1;
}
And that would generate

Код:
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(691) : warning 202: number of arguments does not match definition
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(693) : warning 202: number of arguments does not match definition
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(694) : warning 202: number of arguments does not match definition
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(695) : warning 202: number of arguments does not match definition
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(696) : warning 202: number of arguments does not match definition
So i changed to this
Код:
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
    cache_get_field_content(0, "id", pInfo[playerid][ID]);
    cache_get_field_content(0, "admin", pInfo[playerid][Admin]);
    cache_get_field_content(0, "tokens", pInfo[playerid][Tokens]);
    cache_get_field_content(0, "kills", pInfo[playerid][Kills]);
    cache_get_field_content(0, "deaths", pInfo[playerid][Deaths]);
    cache_get_field_content(0, "human", pInfo[playerid][Human]);
    cache_get_field_content(0, "zombie", pInfo[playerid][Zombie]);
    cache_get_field_content(0, "vip", pInfo[playerid][VIP]);
    cache_get_field_content(0, "viptime", pInfo[playerid][Viptime]);
    cache_get_field_content(0, "pos_x", pInfo[playerid][Pos_x]);
    cache_get_field_content(0, "pos_y", pInfo[playerid][Pos_y]);
    cache_get_field_content(0, "pos_z", pInfo[playerid][Pos_z]);
    LoggedIn[playerid] = true;

    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid,pInfo[playerid][Tokens]);
    SendClientMessage(playerid, -1, "{FF0000}[ACCOUNT]: {FFFFFF}Successfully logged in.");
    return 1;
}
After changing to this i get these.

Код:
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(693) : warning 213: tag mismatch
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(694) : warning 213: tag mismatch
SAMP SCRIPTS\APOC_RP\gamemodes\apoc-rp.pwn(695) : warning 213: tag mismatch
A fix for this would be greatly appreciated and also how to avoid getting this warning message for future reference.
Reply
#2

1. I highly doubt your second will fetch anything because in case destination is an enum you have to specify its length.

For integers you use
destination = cache_get_field_content_int(0, "ID");

Could you please specify which ones are lines 693-695.
Reply
#3

Quote:
Originally Posted by iLearner
Посмотреть сообщение
1. I highly doubt your second will fetch anything because in case destination is an enum you have to specify its length.

For integers you use
destination = cache_get_field_content_int(0, "ID");

Could you please specify which ones are lines 693-695.
Код:
    cache_get_field_content(0, "pos_x", pInfo[playerid][Pos_x]);
    cache_get_field_content(0, "pos_y", pInfo[playerid][Pos_y]);
    cache_get_field_content(0, "pos_z", pInfo[playerid][Pos_z]);
Reply
#4

Quote:
Originally Posted by NationZ
Посмотреть сообщение
Код:
    cache_get_field_content(0, "pos_x", pInfo[playerid][Pos_x]);
    cache_get_field_content(0, "pos_y", pInfo[playerid][Pos_y]);
    cache_get_field_content(0, "pos_z", pInfo[playerid][Pos_z]);
https://sampwiki.blast.hk/wiki/MySQL/R33..._content_float
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)