Undefined Symbol & Tag Mismatch help!
#1

When i try to compile my game mode, i get this error. Please help me, newbie

Код:
D:\Software\DayZ\gamemodes\TLOD.pwn(346) : error 017: undefined symbol "SQL_SERVER"
D:\Software\DayZ\gamemodes\TLOD.pwn(1373) : error 017: undefined symbol "DIALOG_STYLE_TABLIST_HEADERS"
D:\Software\DayZ\gamemodes\TLOD.pwn(2255) : warning 213: tag mismatch
Line 346
Код:
//mysql_log(LOG_ALL);
	g_SQL = mysql_connect(SQL_SERVER, SQL_USER, SQL_DB, SQL_PASSWORD);
	if(mysql_errno() != 0)	print("Could not connect to database!");
Line 1373
Код:
{
	ShowPlayerDialog(playerid,DIALOG_CRAFT,DIALOG_STYLE_TABLIST_HEADERS,"Crafting","Item\tRequires\nChainsaw\t3x iron + 1x rope\nKnife\t1x wood + 1x iron\nBed\t2x Deer skins + 4x wood\nToolbox\t3x copper + 2x iron + 1x wood\nFishing Rod\t1x iron + 1x wood + 1x rope\nBox\t10x woods + 1x hammer\nShovel\t2x copper + 2x wood\nCampfire\t6x wood + 1x rope + 2x iron","Craft","Cancel");
	return 1;
}
Line 2255
Код:
public FCNPC_Moving(npcid)
{
	new Float:p[3];
	pLoop()
	{
	    if(IsPlayerNPC(i)) continue;
		GetPlayerPos(i,p[0],p[1],p[2]);
		if(IsPlayerInRangeOfPoint(npcid,50,p[0],p[1],p[2]))
		{
		 	if(IsPlayerInRangeOfPoint(npcid,1,p[0],p[1],p[2]))
			{
				FCNPC_Punch(npcid,p[0],p[1],p[2],50);
			}

			else FCNPC_GoTo(npcid,p[0],p[1],p[2],MOVE_TYPE_RUN,10,1);
		}
	}
}

public FCNPC_OnTakeDamage(npcid, damagerid, weaponid, bodypart)
{
	return 1;
}
I hope u will help me to fix it. Thanks,
Reply
#2

That GM is severely outdated but it looks like the MYSQL is outdated.

Update the plugins and re-compile.
Reply
#3

First you need to update your a_samp.inc include as you seemed to be using an outdated version that doesn't contain the DIALOG_STYLE_TABLIST_HEADERS definition.

As for your other issue you need to define it in your script, so go to where SQL_USER is defined and above it define.
Код:
#define SQL_SERVER ( 127.0.0.1 ) // or what ever your mysql server address is
Reply
#4

Quote:
Originally Posted by azzerking
Посмотреть сообщение
First you need to update your a_samp.inc include as you seemed to be using an outdated version that doesn't contain the DIALOG_STYLE_TABLIST_HEADERS definition.

As for your other issue you need to define it in your script, so go to where SQL_USER is defined and above it define.
Код:
#define SQL_SERVER ( 127.0.0.1 ) // or what ever your mysql server address is
I already did that and the error still on this, maybe you can Help?

Код:
D:\Software\DayZ\gamemodes\TLOD.pwn(347) : error 001: expected token: ")", but found "."
D:\Software\DayZ\gamemodes\TLOD.pwn(347) : warning 215: expression has no effect
D:\Software\DayZ\gamemodes\TLOD.pwn(347) : error 001: expected token: ";", but found ")"
D:\Software\DayZ\gamemodes\TLOD.pwn(347) : error 029: invalid expression, assumed zero
D:\Software\DayZ\gamemodes\TLOD.pwn(347) : fatal error 107: too many error messages on one line
Line 347:
Код:
g_SQL = mysql_connect(SQL_SERVER, SQL_USER, SQL_DB, SQL_PASSWORD);
Quote:
Originally Posted by Stones
Посмотреть сообщение
That GM is severely outdated but it looks like the MYSQL is outdated.

Update the plugins and re-compile.
I will try it Stones, thanks. Both of you
Reply
#5

Could you post the definitions you made for your mysql db?

** PLEASE CHANGE OR REMOVE YOUR INFORMATION FIRST **
Reply
#6

Quote:
Originally Posted by azzerking
Посмотреть сообщение
First you need to update your a_samp.inc include as you seemed to be using an outdated version that doesn't contain the DIALOG_STYLE_TABLIST_HEADERS definition.

As for your other issue you need to define it in your script, so go to where SQL_USER is defined and above it define.
Код:
#define SQL_SERVER ( 127.0.0.1 ) // or what ever your mysql server address is
You mean #define SQL_SERVER "127.0.0.1"
It's a string, not an integer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)