Textdraw undefined symbol.
#1

Good evening everyone, I am having some trouble with my textdraws as it gives me a undefined symbol everytime.

I will post the code.

pawn Код:
//TEXT DRAWS!!!!
    new Text:login1;
    new Text:TDEditor_TD[6];

login1 = TextDrawCreate(152.500000, 103.666671, "box");
TextDrawLetterSize(login1, 0.000000, 23.625000);
TextDrawTextSize(login1, 478.125000, 0.000000);
TextDrawAlignment(login1, 1);
TextDrawColor(login1, -1);
TextDrawUseBox(login1, 1);
TextDrawBoxColor(login1, 65535);
TextDrawSetShadow(login1, 0);
TextDrawSetOutline(login1, 0);
TextDrawBackgroundColor(login1, 255);
TextDrawFont(login1, 1);
TextDrawSetProportional(login1, 1);
TextDrawSetShadow(login1, 0);

TDEditor_TD[1] = TextDrawCreate(273.125000, 109.500053, "Welcome to StuntMania!");
TextDrawLetterSize(TDEditor_TD[1], 0.400000, 1.600000);
TextDrawAlignment(TDEditor_TD[1], 1);
TextDrawColor(TDEditor_TD[1], -1);
TextDrawSetShadow(TDEditor_TD[1], 0);
TextDrawSetOutline(TDEditor_TD[1], 0);
TextDrawBackgroundColor(TDEditor_TD[1], 255);
TextDrawFont(TDEditor_TD[1], 3);
TextDrawSetProportional(TDEditor_TD[1], 1);
TextDrawSetShadow(TDEditor_TD[1], 0);

TDEditor_TD[2] = TextDrawCreate(161.875000, 156.166687, "Scripted by Trevor");
TextDrawLetterSize(TDEditor_TD[2], 0.400000, 1.600000);
TextDrawAlignment(TDEditor_TD[2], 1);
TextDrawColor(TDEditor_TD[2], -1);
TextDrawSetShadow(TDEditor_TD[2], 0);
TextDrawSetOutline(TDEditor_TD[2], 0);
TextDrawBackgroundColor(TDEditor_TD[2], 255);
TextDrawFont(TDEditor_TD[2], 3);
TextDrawSetProportional(TDEditor_TD[2], 1);
TextDrawSetShadow(TDEditor_TD[2], 0);

TDEditor_TD[3] = TextDrawCreate(388.125000, 113.000022, "Apart of Clear Life Gaming Community!");
TextDrawLetterSize(TDEditor_TD[3], 0.400000, 1.600000);
TextDrawAlignment(TDEditor_TD[3], 1);
TextDrawColor(TDEditor_TD[3], -1);
TextDrawSetShadow(TDEditor_TD[3], 0);
TextDrawSetOutline(TDEditor_TD[3], 0);
TextDrawBackgroundColor(TDEditor_TD[3], 255);
TextDrawFont(TDEditor_TD[3], 3);
TextDrawSetProportional(TDEditor_TD[3], 1);
TextDrawSetShadow(TDEditor_TD[3], 0);

TDEditor_TD[4] = TextDrawCreate(281.875000, 215.666595, "LOGIN");
TextDrawLetterSize(TDEditor_TD[4], 0.856250, 2.965001);
TextDrawAlignment(TDEditor_TD[4], 1);
TextDrawColor(TDEditor_TD[4], -1);
TextDrawSetShadow(TDEditor_TD[4], 0);
TextDrawSetOutline(TDEditor_TD[4], 0);
TextDrawBackgroundColor(TDEditor_TD[4], 255);
TextDrawFont(TDEditor_TD[4], 3);
TextDrawSetProportional(TDEditor_TD[4], 1);
TextDrawSetShadow(TDEditor_TD[4], 0);
TextDrawSetSelectable(TDEditor_TD[4], true);

TDEditor_TD[5] = TextDrawCreate(275.625000, 264.666748, "REGISTER");
TextDrawLetterSize(TDEditor_TD[5], 0.608428, 3.150269);
TextDrawAlignment(TDEditor_TD[5], 1);
TextDrawColor(TDEditor_TD[5], -1);
TextDrawSetShadow(TDEditor_TD[5], 0);
TextDrawSetOutline(TDEditor_TD[5], 0);
TextDrawBackgroundColor(TDEditor_TD[5], 255);
TextDrawFont(TDEditor_TD[5], 3);
TextDrawSetProportional(TDEditor_TD[5], 1);
TextDrawSetShadow(TDEditor_TD[5], 0);
TextDrawSetSelectable(TDEditor_TD[5], true);
This is under OnGameModeInit

Now where the error occurs.
pawn Код:
public OnPlayerConnect(playerid)
{
        TextDrawShowForPlayer(playerid, login1);
        TextDrawShowForPlayer(playerid, TDEditor_TD[1]);
        TextDrawShowForPlayer(playerid, TDEditor_TD[2]);
        TextDrawShowForPlayer(playerid, TDEditor_TD[3]);
        TextDrawShowForPlayer(playerid, TDEditor_TD[4]);
        TextDrawShowForPlayer(playerid, TDEditor_TD[5]);
        SelectTextDraw(playerid, 0xA3B4C5FF);
        return 1;
}
pawn Код:
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(95) : warning 217: loose indentation
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(165) : warning 217: loose indentation
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(195) : error 017: undefined symbol "login1"
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(196) : error 017: undefined symbol "TDEditor_TD"
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(196) : warning 215: expression has no effect
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(196) : error 001: expected token: ";", but found "]"
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(196) : error 029: invalid expression, assumed zero
C:\Users\Trevor.Trevor-PC\Desktop\My Server\gamemodes\MPServer.pwn(196) : fatal error 107: too many error messages on one line
Any help is certainly appreciated!
Reply
#2

Fixed it. Thanks.
Reply
#3

Код:
//TEXT DRAWS!!!!
	new Text:login1;
	new Text:TDEditor_TD[6];
Put it on top Of FS or GM,also use #pragma tabsize 0 to hide loose indentation warnings.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)