help with a .inc from seif
#1

the inc is this
Код:
/*x---------------------------------Important-------------------------------------x*/
//**INCLUDES**//
#include <a_samp>
/*x---------------------------------Defining-------------------------------------x*/
//**VARIABLES**//
new pos1;
new pos2;
new Text:Text[100];
new gametextdrawforplayer;
new gametextdraw;
//**FORWARDS**//
forward GameTextRemoval(textid);
//**NATIVES**//
/*
native DisplayTextForPlayer(playerid, text[], time, font);
native DisplayTextForAll(text[], time, font);
*/
/*x---------------------------------CallBacks-------------------------------------x*/
stock DisplayTextForPlayer(playerid, text[], time, font, pos1, pos2) // Max Fonts: 3(0-3)  <->  Max Styles: 4(1-4)
{
	if (gametextdrawforplayer >= 99) gametextdrawforplayer = 0;
	gametextdrawforplayer++;
	Text[gametextdrawforplayer] = TextDrawCreate(pos1,pos2,text);
	TextDrawAlignment(Text[gametextdrawforplayer],2);
	TextDrawBackgroundColor(Text[gametextdrawforplayer],0x000000ff);
	TextDrawFont(Text[gametextdrawforplayer],font);
	TextDrawLetterSize(Text[gametextdrawforplayer],0.600000,2.400000);
	TextDrawColor(Text[gametextdrawforplayer],0xffffffff);
	TextDrawSetOutline(Text[gametextdrawforplayer],1);
	TextDrawSetProportional(Text[gametextdrawforplayer],1);
	TextDrawSetShadow(Text[gametextdrawforplayer],1);
	TextDrawShowForPlayer(playerid,Text[gametextdrawforplayer]);
	SetTimerEx("GameTextRemoval",time*1000,false,"d",gametextdrawforplayer);
}

stock DisplayTextForAll(text[], time, font, pos1, pos2) // Max Fonts: 3(0-3)  <->  Max Styles: 4(1-4)
{
	if (gametextdraw >= 99) gametextdraw = 0;
	Text[gametextdraw] = TextDrawCreate(pos1, pos2,text);
	TextDrawAlignment(Text[gametextdraw],2);
	TextDrawBackgroundColor(Text[gametextdraw],0x000000ff);
	TextDrawFont(Text[gametextdraw],font);
	TextDrawLetterSize(Text[gametextdraw],0.600000,2.400000);
	TextDrawColor(Text[gametextdraw],0xffffffff);
	TextDrawSetOutline(Text[gametextdraw],1);
	TextDrawSetProportional(Text[gametextdraw],1);
	TextDrawSetShadow(Text[gametextdraw],1);
	TextDrawShowForAll(Text[gametextdraw]);
	SetTimerEx("GameTextRemoval",time*1000,false,"d",gametextdraw);
}

public GameTextRemoval(textid)
{
	TextDrawDestroy(Text[textid]);
	return true;
}
i mod the .inc for can modify the x and y of the text drawns but when i compile show this error
Quote:
Originally Posted by error
seif_text.inc(19) : warning 219: local variable "pos1" shadows a variable at a preceding level
seif_text.inc(19) : warning 219: local variable "pos2" shadows a variable at a preceding level
seif_text.inc(36) : warning 219: local variable "pos1" shadows a variable at a preceding level
seif_text.inc(36) : warning 219: local variable "pos2" shadows a variable at a preceding level
ChrisDM.pwn(554) : warning 203: symbol is never used: "pos1"
ChrisDM.pwn(554) : warning 203: symbol is never used: "pos2"
i added the variables pos1 pos2 but why dont work?.
Reply
#2

Somewhere else in your script (other inc or gamemode) uses that same variable "pos1,pos2". Interfering them, try renaming it.
Reply
#3

Quote:

seif_text.inc(19) : warning 219: local variable "pos1" shadows a variable at a preceding level
seif_text.inc(19) : warning 219: local variable "pos2" shadows a variable at a preceding level
seif_text.inc(36) : warning 219: local variable "pos1" shadows a variable at a preceding level
seif_text.inc(36) : warning 219: local variable "pos2" shadows a variable at a preceding level

These errors mean that you have defined pos1 globally but they dont need to be

Quote:

ChrisDM.pwn(554) : warning 203: symbol is never used: "pos1"
ChrisDM.pwn(554) : warning 203: symbol is never used: "pos2"

This means that after defining them , you have not even used them
Reply
#4

so i dont need put this?? how i fix that?
Quote:
new pos1
new pos2

Reply
#5

Just post in Seif's topic about your problem.
Reply
#6

Quote:
Originally Posted by [B
Vortex ]
Just post in Seif's topic about your problem.
D= Man the dude Peter Corneile have reason, only delete the new pos1 xD
helpme in the down topic
Reply
#7

Maybe you have defined those "pos1 etc.." twice?
Reply
#8

I think that pos1 is defined in the include file and you defined it in the script too ?
Reply
#9

Ctrl + H (Replace) and search for pos1 and replace them with position1 or something. Do the same for pos2, in you script, ofc.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)