PDA

View Full Version : Weird error


Songason
18/07/2012, 06:03 PM
Hey, when I start my server I get the following error:
Script[gamemodes/Test.axm]: Run Time error 19: "File or function not found"

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

#include <a_samp>
#include <zcmd>
#include <sscanf2>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("Test by STProjects");
print("--------------------------------------\n");
return 1;
}

public OnFilterScriptExit()
{
return 1;
}

#else

main()
{
print("\n----------------------------------");
print("Test by STProjects");
print("----------------------------------\n");
}

#endif

//Colors

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF

public OnGameModeInit()
{
//Misc
SetGameModeText("Test Script");
//Classes
AddPlayerClass(0,1315.5812,-901.3412,39.5781,179.4360,0,0,0,0,0,0); // NewSpawn
AddPlayerClass(0,1315.5812,-901.3412,39.5781,179.4360,0,0,0,0,0,0); // NewSpawn guy 2
//Cars
AddStaticVehicle(411,1493.5959,-882.4531,59.2338,296.6128,106,1); // Car1
AddStaticVehicle(596,1584.9061,-1671.8037,5.6127,91.6886,0,1); // LSPD Car 1
AddStaticVehicle(596,1584.5153,-1667.7305,5.6122,90.9567,0,1); // LSPD Car 2
AddStaticVehicle(596,1595.7584,-1709.5861,5.6106,180.7830,0,1); // LSPD Car 3
AddStaticVehicle(596,1587.5105,-1710.6382,5.6107,180.6751,0,1); // LSPD Car 4
AddStaticVehicle(599,1574.3098,-1707.8007,6.0759,179.8558,0,1); // LSPD Car 5
AddStaticVehicle(599,1564.2145,-1709.4862,6.0800,178.4991,0,1); // LSPD Car 6
AddStaticVehicle(601,1543.7295,-1676.5759,5.6494,268.7270,1,1); // LSPD Car 8
AddStaticVehicle(427,1538.8599,-1645.4301,6.0225,359.9162,0,1); // LSPD Car 9
AddStaticVehicle(494,1530.8712,-1645.1381,5.7857,359.0612,54,36); // Car of officer
AddStaticVehicle(409,1454.6981,-856.1747,53.4895,71.6437,1,1); // Limo 1
AddStaticVehicle(409,1437.7620,-850.8962,51.0058,74.2248,1,1); // Limo 1
AddStaticVehicle(409,1418.8579,-847.6682,47.9924,83.4644,1,1); // Limo 3
AddStaticVehicle(417,1291.0210,-787.7387,96.5517,181.3363,0,0); // Heli on Maddog's mansion
AddStaticVehicle(418,1308.8787,-871.8196,39.6712,86.9698,61,61); // Roboi's Food Mart Car 1
AddStaticVehicle(418,1310.9316,-863.2705,39.6712,268.2620,119,119); // Roboi's Food Mart Car 2
AddStaticVehicle(445,1311.7433,-857.1833,39.4531,88.0714,39,39); // Roboi's Food Mart Car 3
AddStaticVehicleEx(405,2468.00000000,-1669.19995117,13.50000000,0.00000000,16,16,15); //Sentinel
//Objects
CreateObject(974,1545.00000000,-1635.80004883,15.30000019,0.00000000,0.00000000,26 8.00000000); //object(tall_fence) (1)
CreateObject(974,1544.90002441,-1621.00000000,15.30000019,0.00000000,0.00000000,26 9.99499512); //object(tall_fence) (2)

return 1;
}

public OnGameModeExit()
{
return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,1315.3195,-907.6172,38.1828);
SetPlayerFacingAngle(playerid,359.6623);
SetPlayerCameraPos(playerid,1315.0741,-911.5731,38.0785);
SetPlayerCameraLookAt(playerid,1316.0923,-912.5001,37.9687);
return 1;
}

public OnPlayerConnect(playerid)
{
return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
return 1;
}

public OnPlayerSpawn(playerid)
{
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
// This example shows a large, white text saying "[playerName] has
// passed away" on everyone's screen, after a player has died or
// has been killed. It shows in text-type 3, for 5 seconds (5000 ms)
new name[ 24 ], string[ 64 ];
GetPlayerName( playerid, name, 24 );

// Format the passed-away message properly, and show it to everyone!
format( string, sizeof(string), "~w~%s has passed away", name );
GameTextForAll( string, 5000, 3 );

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("/helpme", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, COLOR_BLUE, "[INFO]This help command is still in BETA");
SendClientMessage(playerid, COLOR_ORANGE, "[INFO]Enjoy the tutorial!");
SendClientMessage(playerid, COLOR_ORANGE, "[INFO]/Heal - Heals you. /Kill - Performs suicide.");
return 1;
}
if (strcmp("/healme", cmdtext, true, 5) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, COLOR_YELLOW, "(INFO) You have been healed!(This heal command is still in BETA!)");
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;
}
////////////////////////////////////////////////////////////////////////////////
CMD:me(playerid, params[])
{
new
string[128],
action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /me [action]");
return 1;
}
else
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "* %s %s",pName, action);
}
return 1;
}
CMD:do(playerid, params[])
{
new
string[128],
action[100];
if(sscanf(params, "s[100]", action))
{
SendClientMessage(playerid, -1, "USAGE: /do [action]");
return 1;
}
else
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "* %s ((%s))",action, pName);
}
return 1;
}

ViniBorn
18/07/2012, 06:06 PM
Check your plugins ...

Songason
18/07/2012, 06:12 PM
Check your plugins ...

I have 'sscanf.dll', 'sscanf.so' and 'Whirlwind.dll'

Songason
18/07/2012, 06:15 PM
Never mind, got it fixed. I didn't have the plugin's name in my server.cfg file