Tag Mismatch. [REP+]
#1

No idea why this doesn't work. It gives a tag mismatch on this line. (Using SQLite)

pawn Код:
new DB:CrashedPlayers = 0;
Possibly, the 'DB:' tag is wrong, but what should I use then?
Reply
#2

post the 5 lines before and after that line...
Reply
#3

Quote:
Originally Posted by Threshold
Посмотреть сообщение
post the 5 lines before and after that line...
EDIT: Do what he said, so we can see what else it might be.
Reply
#4

pawn Код:
// Other variables...
new playerColors[102] ={ //colors
0xFF8C13FF,0xC715FFFF,0x20B2AAFF,0xDC143CFF,0x6495EDFF,0xf0e68cFF,0x778899FF,0xFF1493FF,0xF4A460FF,0xEE82EEFF,0xFFD720FF,
0x8b4513FF,0x4949A0FF,0x148b8bFF,0x14ff7fFF,0x556b2fFF,0x0FD9FAFF,0x10DC29FF,0x534081FF,0x0495CDFF,0xEF6CE8FF,0xBD34DAFF,
0x247C1BFF,0x0C8E5DFF,0x635B03FF,0xCB7ED3FF,0x65ADEBFF,0x5C1ACCFF,0xF2F853FF,0x11F891FF,0x7B39AAFF,0x53EB10FF,0x54137DFF,
0x275222FF,0xF09F5BFF,0x3D0A4FFF,0x22F767FF,0xD63034FF,0x9A6980FF,0xDFB935FF,0x3793FAFF,0x90239DFF,0xE9AB2FFF,0xAF2FF3FF,
0x057F94FF,0xB98519FF,0x388EEAFF,0x028151FF,0xA55043FF,0x0DE018FF,0x93AB1CFF,0x95BAF0FF,0x369976FF,0x18F71FFF,0x4B8987FF,
0x491B9EFF,0x829DC7FF,0xBCE635FF,0xCEA6DFFF,0x20D4ADFF,0x2D74FDFF,0x3C1C0DFF,0x12D6D4FF,0x48C000FF,0x2A51E2FF,0xE3AC12FF,
0xFC42A8FF,0x2FC827FF,0x1A30BFFF,0xB740C2FF,0x42ACF5FF,0x2FD9DEFF,0xFAFB71FF,0x05D1CDFF,0xC471BDFF,0x94436EFF,0xC1F7ECFF,
0xCE79EEFF,0xBD1EF2FF,0x93B7E4FF,0x3214AAFF,0x184D3BFF,0xAE4B99FF,0x7E49D7FF,0x4C436EFF,0xFA24CCFF,0xCE76BEFF,0xA04E0AFF,
0x9F945CFF,0xDCDE3DFF,0x10C9C5FF,0x70524DFF,0x0BE472FF,0x8A2CD7FF,0x6152C2FF,0xCF72A9FF,0xE59338FF,0xEEDC2DFF,0xD8C762FF,
0x3FE65CFF,0xFFFFFF00,0x000000AA
};
//------------------------------------------------------------------------------
new matbi = 30000;//Warehouse materials
//------------------------------------------------------------------------------
//-------

forward TimerFS();
forward SetPlayerPosWithObjects(playerid,Float:x,Float:y,Float:z);

new DB:CrashedPlayers = 0;
Reply
#5

EDIT: Wrong
Reply
#6

Place it under another area, try placing it under OnFilterScriptInit or OnGameModeInit, depending on what you're using.
Reply
#7

You can't set the value of an SQLite handle. What exactly are you trying to do? A normal integer variable should probably be good enough...
Reply
#8

Tried to put it under OnGameModeInit. Gives the same warning. Also another error, because it's needed in another callback.

Quote:
Originally Posted by Calgon
Посмотреть сообщение
You can't set the value of an SQLite handle. What exactly are you trying to do? A normal integer variable should probably be good enough...
I found this into a gamemode. Check this out:

pawn Код:
public OnGameModeInit()
{
    CrashedPlayers = db_open("players.crashed");

    db_query(DB:CrashedPlayers, "CREATE TABLE IF NOT EXIST [Players] ([id] INTEGER  NOT NULL PRIMARY KEY, \
                              [nick] VARCHAR(25) DEFAULT 'None' UNIQUE NULL, \
                              [x] FLOAT DEFAULT '0.0' NULL, \
                              [y] FLOAT DEFAULT '0.0' NULL, \
                              [z] FLOAT DEFAULT '0.0' NULL, \
                              [a] FLOAT DEFAULT '0.0' NULL, \
                              [w] INTEGER DEFAULT '0' NULL)"
);
Reply
#9

pawn Код:
CrashedPlayers = db_open("players.crashed");
Values by default are 0 or the equivalent for SQLite, so you do not need to set them to 0. When you use db_open() on the handle, you're setting it to a proper value, there's no need to set it to 0.
Reply
#10

new DB:CrashedPlayers = _:0;

But you don't need to set a value when you initiate a variable with a tag..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)