[HELP]Fix This Please !!!
#1

I Want to Add TextDraw In My Server
I Made this with BSN TextDraw Editor
Can You Help me ?? How To Fix This Code ???

OnTopOfScript
Quote:

new Text:DwTDM;
new Text:DwTDM2;
new Text:DwTDM3;
new Text:DwTDM4;
new Text:DwTDM5;

OnGameModeInit
Quote:

//TextDraw
DwTDM = TextDrawCreate(17 ,312 , "/help");
TextDrawFont(DwTDM , 0);
TextDrawLetterSize(DwTDM , 0.5, 3.5);
TextDrawColor(DwTDM , 0x00fff2FF);
TextDrawSetOutline(DwTDM , true);
TextDrawSetProportional(DwTDM , true);
TextDrawSetShadow(DwTDM , 1);
TextDrawUseBox(DwTDM, 1);
TextDrawBoxColor(DwTDM, );
TextDrawBoxSize(DwTDM, 2, 2);

DwTDM2 = TextDrawCreate(19 ,271 , "/credits");
TextDrawFont(DwTDM2 , 3);
TextDrawLetterSize(DwTDM2 , 0.5, 3.5);
TextDrawColor(DwTDM2 , 0xff9a2eFF);
TextDrawSetOutline(DwTDM2 , false);
TextDrawSetProportional(DwTDM2 , true);
TextDrawSetShadow(DwTDM2 , 1);
TextDrawUseBox(DwTDM2, 1);
TextDrawBoxColor(DwTDM2, );
TextDrawBoxSize(DwTDM2, 2, 2);

DwTDM3 = TextDrawCreate(15.5 ,230 , "/rules");
TextDrawFont(DwTDM3 , 1);
TextDrawLetterSize(DwTDM3 , 0.6, 4.2);
TextDrawColor(DwTDM3 , 0xeeff05FF);
TextDrawSetOutline(DwTDM3 , false);
TextDrawSetProportional(DwTDM3 , true);
TextDrawSetShadow(DwTDM3 , 1);
TextDrawUseBox(DwTDM3, 1);
TextDrawBoxColor(DwTDM3, );
TextDrawBoxSize(DwTDM3, 2, 2);

DwTDM4 = TextDrawCreate(431 ,119 , "[New]Devils World Gaming 0.3x");
TextDrawFont(DwTDM4 , 3);
TextDrawLetterSize(DwTDM4 , 0.4, 2.8000000000000003);
TextDrawColor(DwTDM4 , 0x0000ffFF);
TextDrawSetOutline(DwTDM4 , false);
TextDrawSetProportional(DwTDM4 , true);
TextDrawSetShadow(DwTDM4 , 1);
TextDrawUseBox(DwTDM4, 1);
TextDrawBoxColor(DwTDM4, );
TextDrawBoxSize(DwTDM4, 2, 2);

DwTDM5 = TextDrawCreate(380.5 ,446 , "Devils World Gaming 0.3x");
TextDrawFont(DwTDM5 , 3);
TextDrawLetterSize(DwTDM5 , 0.6, 4.2);
TextDrawColor(DwTDM5 , 0x0e00d4FF);
TextDrawSetOutline(DwTDM5 , false);
TextDrawSetProportional(DwTDM5 , true);
TextDrawSetShadow(DwTDM5 , 1);
TextDrawUseBox(DwTDM5, 1);
TextDrawBoxColor(DwTDM5, );
TextDrawBoxSize(DwTDM5, 2, 2);

Quote:

G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(50) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(50) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(51) : error 017: undefined symbol "TextDrawBoxSize"
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(61) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(61) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(62) : error 017: undefined symbol "TextDrawBoxSize"
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(72) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(72) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(73) : error 017: undefined symbol "TextDrawBoxSize"
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(83) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(83) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(84) : error 017: undefined symbol "TextDrawBoxSize"
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(94) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(94) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(95) : error 017: undefined symbol "TextDrawBoxSize"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


15 Errors.

Reply
#2

Not fully sure about the second one but i think it should be TextDrawTextSize.
pawn Код:
TextDrawBoxColor(DwTDM, );//enter a valid color. EG: 0x000001FF (black)
TextDrawBoxSize(DwTDM, 2, 2); //rename TextDrawBoxSize to TextDrawTextSize.
So basically:
pawn Код:
//TextDraw
DwTDM = TextDrawCreate(17 ,312 , "/help");
TextDrawFont(DwTDM , 0);
TextDrawLetterSize(DwTDM , 0.5, 3.5);
TextDrawColor(DwTDM , 0x00fff2FF);
TextDrawSetOutline(DwTDM , true);
TextDrawSetProportional(DwTDM , true);
TextDrawSetShadow(DwTDM , 1);
TextDrawUseBox(DwTDM, 1);
TextDrawBoxColor(DwTDM, 0x000001FF );
TextDrawTextSize(DwTDM, 2, 2);

DwTDM2 = TextDrawCreate(19 ,271 , "/credits");
TextDrawFont(DwTDM2 , 3);
TextDrawLetterSize(DwTDM2 , 0.5, 3.5);
TextDrawColor(DwTDM2 , 0xff9a2eFF);
TextDrawSetOutline(DwTDM2 , false);
TextDrawSetProportional(DwTDM2 , true);
TextDrawSetShadow(DwTDM2 , 1);
TextDrawUseBox(DwTDM2, 1);
TextDrawBoxColor(DwTDM2, 0x000001FF );
TextDrawTextSize(DwTDM2, 2, 2);

DwTDM3 = TextDrawCreate(15.5 ,230 , "/rules");
TextDrawFont(DwTDM3 , 1);
TextDrawLetterSize(DwTDM3 , 0.6, 4.2);
TextDrawColor(DwTDM3 , 0xeeff05FF);
TextDrawSetOutline(DwTDM3 , false);
TextDrawSetProportional(DwTDM3 , true);
TextDrawSetShadow(DwTDM3 , 1);
TextDrawUseBox(DwTDM3, 1);
TextDrawBoxColor(DwTDM3, 0x000001FF );
TextDrawTextSize(DwTDM3, 2, 2);

DwTDM4 = TextDrawCreate(431 ,119 , "[New]Devils World Gaming 0.3x");
TextDrawFont(DwTDM4 , 3);
TextDrawLetterSize(DwTDM4 , 0.4, 2.8000000000000003);
TextDrawColor(DwTDM4 , 0x0000ffFF);
TextDrawSetOutline(DwTDM4 , false);
TextDrawSetProportional(DwTDM4 , true);
TextDrawSetShadow(DwTDM4 , 1);
TextDrawUseBox(DwTDM4, 1);
TextDrawBoxColor(DwTDM4, 0x000001FF );
TextDrawTextSize(DwTDM4, 2, 2);

DwTDM5 = TextDrawCreate(380.5 ,446 , "Devils World Gaming 0.3x");
TextDrawFont(DwTDM5 , 3);
TextDrawLetterSize(DwTDM5 , 0.6, 4.2);
TextDrawColor(DwTDM5 , 0x0e00d4FF);
TextDrawSetOutline(DwTDM5 , false);
TextDrawSetProportional(DwTDM5 , true);
TextDrawSetShadow(DwTDM5 , 1);
TextDrawUseBox(DwTDM5, 1);
TextDrawBoxColor(DwTDM5, 0x000001FF );
TextDrawTextSize(DwTDM5, 2, 2);
Reply
#3

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Not fully sure about the second one but i think it should be TextDrawTextSize.
pawn Код:
TextDrawBoxColor(DwTDM, );//enter a valid color. EG: 0x000001FF (black)
TextDrawBoxSize(DwTDM, 2, 2); //rename TextDrawBoxSize to TextDrawTextSize.
So basically:
pawn Код:
//TextDraw
DwTDM = TextDrawCreate(17 ,312 , "/help");
TextDrawFont(DwTDM , 0);
TextDrawLetterSize(DwTDM , 0.5, 3.5);
TextDrawColor(DwTDM , 0x00fff2FF);
TextDrawSetOutline(DwTDM , true);
TextDrawSetProportional(DwTDM , true);
TextDrawSetShadow(DwTDM , 1);
TextDrawUseBox(DwTDM, 1);
TextDrawBoxColor(DwTDM, 0x000001FF );
TextDrawTextSize(DwTDM, 2, 2);

DwTDM2 = TextDrawCreate(19 ,271 , "/credits");
TextDrawFont(DwTDM2 , 3);
TextDrawLetterSize(DwTDM2 , 0.5, 3.5);
TextDrawColor(DwTDM2 , 0xff9a2eFF);
TextDrawSetOutline(DwTDM2 , false);
TextDrawSetProportional(DwTDM2 , true);
TextDrawSetShadow(DwTDM2 , 1);
TextDrawUseBox(DwTDM2, 1);
TextDrawBoxColor(DwTDM2, 0x000001FF );
TextDrawTextSize(DwTDM2, 2, 2);

DwTDM3 = TextDrawCreate(15.5 ,230 , "/rules");
TextDrawFont(DwTDM3 , 1);
TextDrawLetterSize(DwTDM3 , 0.6, 4.2);
TextDrawColor(DwTDM3 , 0xeeff05FF);
TextDrawSetOutline(DwTDM3 , false);
TextDrawSetProportional(DwTDM3 , true);
TextDrawSetShadow(DwTDM3 , 1);
TextDrawUseBox(DwTDM3, 1);
TextDrawBoxColor(DwTDM3, 0x000001FF );
TextDrawTextSize(DwTDM3, 2, 2);

DwTDM4 = TextDrawCreate(431 ,119 , "[New]Devils World Gaming 0.3x");
TextDrawFont(DwTDM4 , 3);
TextDrawLetterSize(DwTDM4 , 0.4, 2.8000000000000003);
TextDrawColor(DwTDM4 , 0x0000ffFF);
TextDrawSetOutline(DwTDM4 , false);
TextDrawSetProportional(DwTDM4 , true);
TextDrawSetShadow(DwTDM4 , 1);
TextDrawUseBox(DwTDM4, 1);
TextDrawBoxColor(DwTDM4, 0x000001FF );
TextDrawTextSize(DwTDM4, 2, 2);

DwTDM5 = TextDrawCreate(380.5 ,446 , "Devils World Gaming 0.3x");
TextDrawFont(DwTDM5 , 3);
TextDrawLetterSize(DwTDM5 , 0.6, 4.2);
TextDrawColor(DwTDM5 , 0x0e00d4FF);
TextDrawSetOutline(DwTDM5 , false);
TextDrawSetProportional(DwTDM5 , true);
TextDrawSetShadow(DwTDM5 , 1);
TextDrawUseBox(DwTDM5, 1);
TextDrawBoxColor(DwTDM5, 0x000001FF );
TextDrawTextSize(DwTDM5, 2, 2);
Thanks...
Now,I have 10 Errors

Quote:

G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(50) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(50) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(61) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(61) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(72) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(72) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(83) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(83) : error 035: argument type mismatch (argument 2)
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(94) : error 029: invalid expression, assumed zero
G:\GTA SA-MP Installers\Server MTA\filterscripts\DwTDMTextDraw.pwn(94) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


10 Errors.

Reply
#4

Are you sure you copied and pasted it correctly?

I have compiled it without errors on my main GM and a test GM.
Reply
#5

Try to put the textdraws under ongamemodeinit/onfilterscriptinit ....
Reply
#6

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
Are you sure you copied and pasted it correctly?

I have compiled it without errors on my main GM and a test GM.
IDK...
Reply
#7

Quote:
Originally Posted by denom
Посмотреть сообщение
Try to put the textdraws under ongamemodeinit/onfilterscriptinit ....
Okay...
I'll Try it ...
Reply
#8

are you sure you use it on a function? like in OnGameModeInit ?
Reply
#9

Quote:
Originally Posted by Aliassassin123456
Посмотреть сообщение
are you sure you use it on a function? like in OnGameModeInit ?
OnGameModeInit is a Callback
Reply
#10

Quote:
Originally Posted by EiresJason
Посмотреть сообщение
OnGameModeInit is a Callback
i know it
you can use it on your own function like
pawn Код:
LOL()
{
     //Codes here
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)