SA-MP Forums Archive
Error - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Error (/showthread.php?tid=134308)



Error - DarkPower - 16.03.2010

Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

//FORWARDI
forward text1(playerid);
forward text2(playerid);
forward text3(playerid);
forward text4(playerid);

//DEFINIRANJE
new Textdraw1;
new Textdraw2;
new Textdraw3;
new Textdraw4;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	
	
	Textdraw1 = TextDrawCreate(1.000000,433.000000, "Los Santos RPG");
	TextDrawAlignment(Textdraw1,0);
	TextDrawBackgroundColor(Textdraw1,0x000000ff);
	TextDrawFont(Textdraw1,1);
	TextDrawLetterSize(Textdraw1,0.499999,1.100000);
	TextDrawColor(Textdraw1,0xffffffff);
	TextDrawSetOutline(Textdraw1,0);
	TextDrawSetProportional(Textdraw1,1);
	//textdraw 2
	Textdraw2 = TextDrawCreate(1.000000,433.000000, "Za sve potrebne komande napisite /HELP");
	TextDrawAlignment(Textdraw2,0);
	TextDrawBackgroundColor(Textdraw2,0x000000ff);
	TextDrawFont(Textdraw2,1);
	TextDrawLetterSize(Textdraw2,0.499999,1.100000);
	TextDrawColor(Textdraw2,0xffffffff);
	TextDrawSetOutline(Textdraw2,0);
	TextDrawSetProportional(Textdraw2,1);
	//textdraw 3
	Textdraw3 = TextDrawCreate(1.000000,433.000000, "Ako trebate pomoc obratite se adminima na /report");
	TextDrawAlignment(Textdraw3,0);
	TextDrawBackgroundColor(Textdraw3,0x000000ff);
	TextDrawFont(Textdraw3,1);
	TextDrawLetterSize(Textdraw3,0.499999,1.100000);
	TextDrawColor(Textdraw3,0xffffffff);
	TextDrawSetOutline(Textdraw3,0);
	TextDrawSetProportional(Textdraw3,1);
	//textdraw 4
	Textdraw4 = TextDrawCreate(1.000000,433.000000, "Ako se ne snalazite po gradu napisite /gps za sve vazne lokacije");
	TextDrawAlignment(Textdraw4,0);
	TextDrawBackgroundColor(Textdraw4,0x000000ff);
	TextDrawFont(Textdraw4,1);
	TextDrawLetterSize(Textdraw4,0.499999,1.100000);
	TextDrawColor(Textdraw4,0xffffffff);
	TextDrawSetOutline(Textdraw4,0);
	TextDrawSetProportional(Textdraw4,1);
	return 1;
}

#endif

public OnPlayerSpawn(playerid)
{
  SetTimerEx("text1", 30000, false, "d",playerid);// tekst ce se promijeniti svakih 30 sekundi
  TextDrawShowForPlayer(playerid, Textdraw1);
	return 1;
}

public text1(playerid)
{
  SetTimerEx("text2", 30000, false, "d",playerid);// tekst ce se promijeniti svakih 30 sekundi
	 //SAKRI
  TextDrawHideForPlayer(playerid,Textdraw1);
  //POKAZI
  TextDrawShowForPlayer(playerid, Textdraw2);
  return 1;
}
public text2(playerid)
{
  SetTimerEx("text3", 30000, false, "d",playerid);// tekst ce se promijeniti svakih 30 sekundi
	 //SAKRI
  TextDrawHideForPlayer(playerid,Textdraw2);
  //POKAZI
  TextDrawShowForPlayer(playerid, Textdraw3);
  return 1;
}
public text3(playerid)
{
  SetTimerEx("text3", 30000, false, "d",playerid);// tekst ce se promijeniti svakih 30 sekundi
	 //SAKRI
  TextDrawHideForPlayer(playerid,Textdraw3);
  //POKAZI
  TextDrawShowForPlayer(playerid, Textdraw4);
  return 1;
}
and i get this errors

C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(71) : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(79) : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(81) : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(8 : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(90) : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(97) : warning 213: tag mismatch
C:\Documents and Settings\PaNtEk!\Desktop\GF SERVER\filterscripts\textdeaw.pwn(99) : warning 213: tag mismatch
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


7 Warnings.

all error lines are the same:
Код:
TextDrawShowForPlayer(playerid, Textdraw1);
< on that lines show errors

Can anyone fix me that
tnx


Re: Error - Carlton - 16.03.2010

You can't make your textdraw variables like this:
pawn Код:
new Textdraw1;
new Textdraw2;
new Textdraw3;
new Textdraw4;
You need to put a Text: in front of the variables, so replace your variables with this:
pawn Код:
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;



Re: Error - DarkPower - 16.03.2010

Quote:
Originally Posted by Carlton
You can't make your textdraw variables like this:
pawn Код:
new Textdraw1;
new Textdraw2;
new Textdraw3;
new Textdraw4;
You need to put a Text: in front of the variables, so replace your variables with this:
pawn Код:
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
OMG you dont know how imberess i am now