Problem with wierd errors and ques
#4

Quote:
Originally Posted by Marcel
You should either use COLOR_GREEN or the hex code. Not both of them. So use
pawn Код:
SendClientMessage(playerid,COLOR_GREEN,"Hello");
or
pawn Код:
SendClientMessage(playerid,0xFFFFFF,"Hello");
print is to display something in the server window, also shows up in server_log.txt. With define you can do
pawn Код:
#define hellomessage "hello you"
Now you can use hellomessage instead of "hello you".
With #if defined you can check if you defined something. With this you can do
pawn Код:
#define filterscript
then check with
pawn Код:
#if defined filterscript
wether you have to run OnGameModeInit or OnFilterScriptInit
#include <a_samp>


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

#if defined FILTERSCRIPT
#define COLOR_GREEN
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Blank Filterscript by your name here");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print(" Blank Gamemode by your name here");
print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
// Don't use these lines if it's a filterscript
SetGameModeText("Blank Script");
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 150,28,150, 17, 5);
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 30, 150,28,150, 17, 5);
AddStaticVehicle(461,2044.5735,1340.5673,10.6719,2 02.1141,0,0); // deathmatch
AddStaticVehicle(461,2066.3049,1338.2623,10.6719,2 70.1081,0,0); // deathmatch
AddStaticVehicle(461,2073.9138,1368.8851,10.6797,3 49.3821,0,0); // deathmatch
AddStaticVehicle(461,2079.0996,1391.5702,10.8125,4 1.7093,0,0); // deathmatch
AddStaticVehicle(468,2062.6018,1395.7776,10.6719,1 36.3368,0,0); // deathmatch
AddStaticVehicle(468,2044.2549,1391.3947,10.6719,4 0.4559,0,0); // deathmatch
AddStaticVehicle(468,2030.8125,1377.2780,10.8203,1 34.4568,0,0); // deathmatch
AddStaticVehicle(411,2025.0352,1343.3579,10.8203,1 91.1707,0,0); // deathmatch
AddStaticVehicle(411,2068.1523,1330.4552,10.6797,2 21.0504,0,0); // deathmatch
CreateObject(1655, 2045.988892, 1551.345215, 10.971987, 0.0000, 0.0000, 0.0000);
CreateObject(12956, 2094.068848, 1098.776978, 13.648555, 0.0000, 0.0000, 0.0000);
AddStaticVehicle(520, 2109.1763, 1503.0453, 32.2887, 82.2873, 0, 1);//example
return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
return 1;
}

public OnPlayerRequestSpawn(playerid)
{
return 1;
}

public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,COLOR_GREEN,''hello'')
return 1;
}




Here is my script. I get same errors which i told in first post. I defined COLOR_GREEN and i get error it is undefined. And i get error that ''hello'' isnt defined. Why should i define ''hello''? Its just a word
Reply


Messages In This Thread
Problem with wierd errors and ques - by Michael Abbruzi - 04.03.2009, 19:00
Re: Problem with wierd errors and ques - by Marcel - 04.03.2009, 19:03
Re: Problem with wierd errors and ques - by Daren_Jacobson - 04.03.2009, 21:55
Re: Problem with wierd errors and ques - by Michael Abbruzi - 05.03.2009, 12:10
Re: Problem with wierd errors and ques - by Daren_Jacobson - 05.03.2009, 13:59

Forum Jump:


Users browsing this thread: 2 Guest(s)