Float doesnt work
#1

Код:
C:\Users\Titanium\Desktop\Paint Ball DM By ic3_cr3am\gamemodes\PB1.pwn(402) : warning 203: symbol is never used: "gRandomPlayerSpawns"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
^^
this is what i get when i compile my script. Does anyone know how to fix this??

Here is my script

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

#include <a_samp>

forward message();

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print(" Blank Filterscript by your name here");
	print("--------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}

#else



main()
{
	print("\n************************************");
	print(" Paint Ball DM ADiD@S");
	print("************************************\n");
}

new Float:gRandomPlayerSpawns[3][3] = {
{2183.50,1678.49,11.10},
{1832.51,-2614.13,14.19},
{404.14,2444.57,16.50}
};

#endif

public OnGameModeInit()
{
	// Don't use these lines if it's a filterscript
	SetGameModeText("AiM Dm 0.1");
	AddPlayerClass(209,2464.9995,-1714.9498,13.5001,349.3894,0,0,0,0,0,0);
    AddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,0,0);
	AddPlayerClass(266,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,0,0);
	AddPlayerClass(267,1958.3783,1343.1572,15.3746,270.1425,0,0,0,0,0,0);
	AddPlayerClass(268,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);
	AddPlayerClass(269,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);
	AddPlayerClass(270,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);
	AddPlayerClass(271,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);
	AddPlayerClass(272,1958.3783,1343.1572,15.3746,269.1425,0,0,0,0,0,0);
	SendClientMessageToAll(0x33FF33AA, "Map: Grove Street By ADiD@S"); //CHNAGE_ME if you change map change Grove Street to map your map name and ic3_cr3am to the maps owners name
	SetTimer("message", 300000, false); //300000 = map time/ round time
	
	CreateObject(8171,2387.6999500,1359.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (1)
	CreateObject(8171,2348.1001000,1359.0000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (2)
	CreateObject(8171,2308.1001000,1358.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (3)
	CreateObject(8171,2268.1999500,1358.9000200,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (4)
	CreateObject(8171,2228.3999000,1358.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (5)
	CreateObject(8171,2188.3999000,1359.0000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (6)
	CreateObject(8171,2148.3999000,1358.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (7)
	CreateObject(8171,2108.5000000,1358.4000200,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (8)
	CreateObject(8171,2068.6999500,1358.0999800,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (9)
	CreateObject(8171,2028.9000200,1358.3000500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (10)
	CreateObject(8171,1989.4000200,1358.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (11)
	CreateObject(8171,2387.5000000,1221.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (13)
	CreateObject(8171,2348.1001000,1220.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (12)
	CreateObject(8171,2308.1999500,1221.3000500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (14)
	CreateObject(8171,2268.5000000,1221.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (15)
	CreateObject(8171,2228.3999000,1220.5999800,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (16)
	CreateObject(8171,2188.3999000,1221.0000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (17)
	CreateObject(8171,2148.6999500,1220.4000200,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (18)
	CreateObject(8171,2108.8000500,1220.5000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (19)
	CreateObject(8171,2068.8000500,1221.0999800,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (20)
	CreateObject(8171,2029.0999800,1220.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (21)
	CreateObject(8171,1989.1999500,1220.8000500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (22)
	CreateObject(4882,2069.3999000,1298.9000200,916.5000000,0.0000000,0.0000000,90.0000000); //object(lasbrid1_las) (1)
	CreateObject(3472,1989.4000200,1395.4000200,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (1)
	CreateObject(3472,1989.5999800,1364.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (2)
	CreateObject(3472,1989.5000000,1331.0000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (3)
	CreateObject(3472,1989.5000000,1290.5999800,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (4)
	CreateObject(3472,1989.4000200,1257.4000200,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (5)
	CreateObject(3472,1989.4000200,1226.5000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (6)
	CreateObject(3472,1989.1999500,1193.1999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (7)
	CreateObject(3472,1989.3000500,1152.5000000,911.5999800,0.0000000,0.0000000,0.0000000); //object(circuslampost03) (8)
	CreateObject(7245,1890.4000200,1177.0000000,901.0999800,0.0000000,0.0000000,270.0000000); //object(vegasnbank1ug) (1)
	CreateObject(2395,1885.6999500,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (1)
	CreateObject(2395,1889.0000000,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (2)
	CreateObject(2395,1892.5000000,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (3)
	CreateObject(2395,1896.0000000,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (5)
	CreateObject(2395,1914.0000000,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (6)
	CreateObject(2395,1910.3000500,1189.5799600,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (7)
	CreateObject(2395,1909.3000500,1189.5999800,904.0000000,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (8)
	CreateObject(2395,1885.6992200,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (9)
	CreateObject(2395,1889.0000000,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (10)
	CreateObject(2395,1892.5000000,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (11)
	CreateObject(2395,1896.0000000,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (12)
	CreateObject(2395,1910.2998000,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (13)
	CreateObject(2395,1914.0000000,1189.5791000,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (14)
	CreateObject(2395,1909.2998000,1189.5996100,906.7000100,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (15)
	CreateObject(2395,1885.6992200,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (16)
	CreateObject(2395,1889.0000000,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (17)
	CreateObject(2395,1892.5000000,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (18)
	CreateObject(2395,1896.0000000,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (19)
	CreateObject(2395,1910.2998000,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (20)
	CreateObject(2395,1909.2998000,1189.5996100,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (21)
	CreateObject(2395,1914.0000000,1189.5791000,909.4000200,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (22)
	CreateObject(2395,1899.5000000,1189.6999500,909.2999900,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (23)
	CreateObject(2395,1903.0000000,1189.8000500,909.2999900,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (24)
	CreateObject(2395,1906.5000000,1189.9000200,909.2999900,0.0000000,0.0000000,0.0000000); //object(cj_sports_wall) (25)
	CreateObject(3491,2373.0000000,1399.8000500,920.0999800,0.0000000,0.0000000,0.0000000); //object(vegass_hanger2) (1)
	CreateObject(3887,1961.3000500,1215.5000000,919.7999900,0.0000000,0.0000000,180.0000000); //object(demolish4_sfxrf) (1)
	CreateObject(8171,1949.5999800,1257.6999500,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (23)
	CreateObject(5710,1906.1999500,1209.9000200,917.0999800,0.0000000,0.0000000,0.0000000); //object(cem01_law) (1)
	CreateObject(8171,1909.6999500,1258.0999800,911.5999800,0.0000000,0.0000000,0.0000000); //object(vgssairportland06) (24)
	CreateObject(5716,1921.0999800,1170.9000200,924.9000200,0.0000000,0.0000000,180.0000000); //object(manns01_lawn) (1)
	CreateObject(8493,1927.4000200,1282.9000200,926.0000000,0.0000000,25.0000000,112.0000000); //object(pirtshp01_lvs) (1)
	CreateObject(11427,1906.5000000,1237.9000200,918.7999900,0.0000000,0.0000000,176.0000000); //object(des_adobech) (1)
	CreateObject(13295,1894.5999800,1268.8000500,918.2000100,0.0000000,0.0000000,328.0000000); //object(ce_terminal1) (1)
	CreateObject(16770,1964.5000000,1307.4000200,913.2000100,0.0000000,0.0000000,180.0000000); //object(des_gunbldg01) (1)
	CreateObject(16770,1964.4000200,1319.4000200,913.2000100,0.0000000,0.0000000,179.9950000); //object(des_gunbldg01) (2)
	CreateObject(5409,1980.3000500,1169.4000200,916.0999800,0.0000000,0.0000000,0.0000000); //object(laepetrol1a) (1)
	CreateObject(1676,2003.1999500,1170.0999800,913.2999900,0.0000000,0.0000000,90.0000000); //object(washgaspump) (1)
	CreateObject(1676,2003.3000500,1167.9000200,913.2999900,0.0000000,0.0000000,90.0000000); //object(washgaspump) (2)
	CreateObject(1676,2003.1999500,1175.4000200,913.2999900,0.0000000,0.0000000,90.0000000); //object(washgaspump) (3)
	CreateObject(1676,2003.1999500,1177.9000200,913.2999900,0.0000000,0.0000000,90.0000000); //object(washgaspump) (4)
	CreateObject(8171,2540.0000000,-1679.4000200,32.4000000,0.0000000,90.0000000,180.0000000); //object(vgssairportland06) (25)
	CreateObject(8171,2471.8000500,-1631.5000000,32.4000000,0.0000000,90.0000000,271.9950000); //object(vgssairportland06) (26)
	CreateObject(8171,2420.6001000,-1667.6999500,32.4000000,0.0000000,90.0000000,359.9940000); //object(vgssairportland06) (27)
	CreateObject(8171,2474.3000500,-1732.0999800,32.4000000,0.0000000,90.0000000,89.9890000); //object(vgssairportland06) (28)
	CreateObject(939,2483.1001000,-1666.1999500,14.8000000,0.0000000,0.0000000,46.0000000); //object(cj_df_unit) (1)
	CreateObject(939,2494.3000500,-1676.0999800,14.8000000,0.0000000,0.0000000,304.0000000); //object(cj_df_unit) (2)
	CreateObject(939,2471.6001000,-1686.5000000,14.8000000,0.0000000,0.0000000,231.9970000); //object(cj_df_unit) (3)
	CreateObject(939,2464.8999000,-1655.9000200,14.8000000,0.0000000,0.0000000,133.9930000); //object(cj_df_unit) (4)
	CreateObject(939,2435.6001000,-1650.0000000,14.8000000,0.0000000,0.0000000,221.9890000); //object(cj_df_unit) (5)
	CreateObject(939,2434.8999000,-1671.6999500,14.8000000,0.0000000,0.0000000,119.9840000); //object(cj_df_unit) (6)
	CreateObject(3594,2457.0000000,-1673.3000500,13.7000000,0.0000000,90.0000000,40.0000000); //object(la_fuckcar1) (1)
	CreateObject(3359,2428.1001000,-1640.5999800,26.3000000,0.0000000,0.0000000,182.0000000); //object(cxrf_savhusgar1_) (1)
	CreateObject(3279,2501.0000000,-1652.5000000,10.5000000,0.0000000,340.0000000,224.0000000); //object(a51_spottower) (1)
	CreateObject(726,2533.6999500,-1649.3000500,13.8000000,0.0000000,0.0000000,0.0000000); //object(tree_hipoly19) (1)
	CreateObject(726,2460.6001000,-1716.3000500,12.5000000,0.0000000,0.0000000,0.0000000); //object(tree_hipoly19) (2)
	CreateObject(1632,2508.6001000,-1669.8000500,13.2000000,0.0000000,0.0000000,58.0000000); //object(waterjump1) (1)
	CreateObject(1632,2503.1999500,-1666.4000200,13.2000000,0.0000000,0.0000000,237.9970000); //object(waterjump1) (2)
	return 1;
}

public message()
{
	SendClientMessageToAll(0x375FFFFF, "The next map will be The same damn thing."); //SendClientMessageToAll(0x375FFFFF, "The next map will be example");
    SendRconCommand("changemode PB1"); //SendRconCommand("changemode example"); CHNAGE_ME change PB1 to ur gamemode
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SpawnPlayer(playerid);
	return 1;
}

public OnPlayerConnect(playerid)
{
 	new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), ">>JOIN: %s has joined the server", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
    
  	return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
	new pname[MAX_PLAYER_NAME], string[22 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), ">>LEAVE: %s has left the server", pname);
    SendClientMessageToAll(0xAAAAAAAA, string);
	return 1;
}

public OnPlayerSpawn(playerid)
{
// now this is the random spawn part -coming soon
new rand = random(4); // 4 = number of spawns you want
{
    if(rand == 0)//spawn 0
    {
    SetPlayerPos(playerid, 2464.9995, -1714.9498, 13.5001);
    }
    if(rand == 1)//spawn 1
    {
    SetPlayerPos(playerid, 2508.8445, -1688.6021, 13.5333);
    }
    
    if(rand == 2)//"
    {
    SetPlayerPos(playerid, 2512.1296, -1650.9603, 13.9422);
    }
    
    if(rand == 3)//"
    {
    SetPlayerPos(playerid, 2454.5354, -1676.2017, 13.5018);
    }
    
    if(rand == 4)//"
    {
    SetPlayerPos(playerid, 2434.2197, -1644.0834, 13.4994 );
    }
    //if you want more spawns just copy and paste
    //-------------------------------------------------
	//if(rand == 4)//change 4 to 5
    //{
    //SetPlayerPos(playerid, and );
    //}
    //-----------------------------------
	
	GivePlayerWeapon(playerid, 9, 99999999);
	GivePlayerWeapon(playerid, 24, 99999999);
	GivePlayerWeapon(playerid, 26, 99999999);
	GivePlayerWeapon(playerid, 28, 99999999);
	GivePlayerWeapon(playerid, 31, 99999999);
	SetPlayerHealth(playerid, 100);
	SetPlayerArmour(playerid, 100);
	return 1;
}
}
public OnPlayerDeath(playerid, killerid, reason)
{
	SendDeathMessage(killerid, playerid, reason);
	SetPlayerScore(killerid,GetPlayerScore(killerid)+1);//CHANGE_ME change 1 to the the number of score the killer must get
	GivePlayerMoney(killerid, random(10000)); // 500 it the money that the killer will get but it will be random 0-500
	GivePlayerMoney(playerid, -random(5000)); //100 is the money player that died looses its random
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid, 0);
        SetPlayerArmour(playerid, 0);
		return 1;
	}
	return 0;

}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnVehicleMod(playerid, vehicleid, componentid)
{
	return 1;
}

public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
	return 1;
}

public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
	return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	return 1;
}

public OnRconLoginAttempt(ip[], password[], success)
{
	return 1;
}

public OnPlayerUpdate(playerid)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}
Reply
#2

You assign values to gRandomPlayerSpawns but you never use them anywhere. The variable gRandomPlayerSpawns is never used.
Reply
#3

Quote:
Originally Posted by [HiC]TheKiller
Посмотреть сообщение
You assign values to gRandomPlayerSpawns but you never use them anywhere. The variable gRandomPlayerSpawns is never used.
That would be right but gRandomPlayerSpawns should be written like this

pawn Код:
enum SPAWNINFO
{
    Float:gSpawnX,
    Float:gSpawnY,
    Float:gSpawnZ,
    Float:gSpawnFA
}

new gRandomPlayerSpawns [][SPAWNINFO] = {
   { 0.0,  0.0,  0.0,  0.0 },
   { 0.0,  0.0,  0.0,  0.0 },
   { 0.0,  0.0,  0.0,  0.0 },
   { 0.0,  0.0,  0.0,  0.0 }
};
Reply
#4

How do i fix this?
Reply
#5

@[uL]Pottus: What makes you think that?

@AIMigboboy: Either remove the array or use it.
Reply
#6

If you might be using it later and want to hide the warning - make it stock, if your not going to use it - delete it.

You also dont need to give a size for it. So it's easier to add more co-ords later.

pawn Код:
new stock Float:gRandomPlayerSpawns[][] = {
    {2183.50,1678.49,11.10},
    {1832.51,-2614.13,14.19},
    {404.14,2444.57,16.50}
};
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)