Textdraw errors.
#1

hi guys so im try to make a textdraw that displays my servers website but when i try to compile it i get this. yes i know i suck at scripting lol

Code:
C:\Documents and Settings\Administrator\Desktop\gta sa server\gamemodes\FasDW.pwn(38) : error 017: undefined symbol "WebSite"
C:\Documents and Settings\Administrator\Desktop\gta sa server\gamemodes\FasDW.pwn(44) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
heres what im trying to do.

Code:
#include <a_samp>

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_WATER 0x33AAAA33
#if defined FILTERSCRIPT

new Text:WebSite;

public OnFilterScriptInit()
{
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else

main()
{
	print("\n-----------------------------------------");
	print(" DDP DRIFT WORLD!");
	print("-----------------------------------------\n");
}

#endif

public OnGameModeInit()
{
    WebSite = TextDrawCreate(500.000000,109.000000,"~b~www.~y~dadriftpros.~r~tk");
    TextDrawAlignment(WebSite,0);
    TextDrawBackgroundColor(WebSite,0x000000ff);
    TextDrawFont(WebSite,3);
    TextDrawLetterSize(WebSite,0.299999,1.000000);
    TextDrawColor(WebSite,0xffffffff);
    TextDrawSetOutline(WebSite,1);
    TextDrawSetProportional(WebSite,1);
    TextDrawSetShadow(WebSite,1);
    return 1;
halp?
Reply
#2

Quote:
Originally Posted by xXitsgodzillaXx
View Post
hi guys so im try to make a textdraw that displays my servers website but when i try to compile it i get this. yes i know i suck at scripting lol
It seems like you are doing something wrong..

pawn Code:
new Text:welcomeText;
 
public OnGameModeInit()
{
    welcomeText = TextDrawCreate(240.0,580.0,"Welcome to my SA-MP server");// the textdraw creating thing is ALWAYS done on GAMEMODEINIT!! remember.
    return 1;
}
 //to create the textdraw you can use OnPlayerConnect or a independent command such as /textdrawshow etc..
public OnPlayerConnect(playerid)
{
    //This is used to show the player the textdraw when they connect.
    TextDrawShowForPlayer(playerid,welcomeText);
}
This is how the textdraw's are created. You can use the following link for more info.

https://sampwiki.blast.hk/wiki/TextDrawCreate

-FalconX
Reply
#3

Quote:
Originally Posted by ue_falconx
View Post
It seems like you are doing something wrong..

pawn Code:
new Text:welcomeText;
 
public OnGameModeInit()
{
    welcomeText = TextDrawCreate(240.0,580.0,"Welcome to my SA-MP server");// the textdraw creating thing is ALWAYS done on GAMEMODEINIT!! remember.
    return 1;
}
 //to create the textdraw you can use OnPlayerConnect or a independent command such as /textdrawshow etc..
public OnPlayerConnect(playerid)
{
    //This is used to show the player the textdraw when they connect.
    TextDrawShowForPlayer(playerid,welcomeText);
}
This is how the textdraw's are created. You can use the following link for more info.

https://sampwiki.blast.hk/wiki/TextDrawCreate

-FalconX
yeah i should be doing everything correct. but it keeps saying "error 017: undefined symbol "WebSite"
Reply
#4

pawn Code:
#if defined FILTERSCRIPT
Remove all lines that start with a hash sign (#) and remove OnFilterScriptInit/Exit.
Reply
#5

Quote:
Originally Posted by Vince
View Post
pawn Code:
#if defined FILTERSCRIPT
Remove all lines that start with a hash sign (#) and remove OnFilterScriptInit/Exit.
can you explain this is noobie terms? heh. soz, im not the brightest when it comes to this stuff. :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)