Unable to find file or function -
Stones - 22.05.2014
So, i'm getting that
PHP код:
Run time error 19: "File or function is not found"
I was wondering if anyone knew how to fix it, the script comply's fine so i don't think it's a problem with the script
PHP код:
SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team
[15:36:03] filterscripts = "" (string)
[15:36:03]
[15:36:03] Server Plugins
[15:36:03] --------------
[15:36:03] Loading plugin: nativechecker.dll
[15:36:03] Loaded.
[15:36:03] Loading plugin: whirlpool.dll
[15:36:03]
[15:36:03] ==================
[15:36:03]
[15:36:03] Whirlpool loaded
[15:36:03]
[15:36:03] ==================
[15:36:03]
[15:36:03] Loaded.
[15:36:03] Loaded 2 plugins.
[15:36:03]
[15:36:03] Filterscripts
[15:36:03] ---------------
[15:36:03] Loaded 0 filterscripts.
[15:36:03] Error: Function not registered: 'Streamer_CallbackHook'
[15:36:03] Error: Function not registered: 'WP_Hash'
[15:36:03] Error: Function not registered: 'CreateDynamicObject'
[15:36:03] Script[gamemodes/TNS.amx]: Run time error 19: "File or function is not found"
[15:36:03] Number of vehicle models: 0
PHP код:
echo Executing Server Config...
lanmode 0
rcon_password LOOL
maxplayers 50
port 7777
hostname TEST
gamemode0 TNS
filterscripts
plugins nativechecker.dll whirlpool.dll
announce 0
query 1
chatlogging 0
weburl www.sa-mp.com
onfoot_rate 40
incar_rate 40
weapon_rate 40
stream_distance 300.0
stream_rate 1000
maxnpc 0
logtimeformat [%H:%M:%S]
Re: Unable to find file or function -
Konstantinos - 22.05.2014
You forgot to load streamer plugin so make sure streamer.dll is located in
plugins folder and change the line (from server.cfg) to:
pawn Код:
plugins streamer Whirlpool nativechecker
Re: Unable to find file or function -
Stones - 22.05.2014
Wow, my own stupidity got the better of me haha, but em, thanks for your help mate
Work's a treat now.
PHP код:
*** Streamer Plugin v2.7.2 by Incognito loaded ***
[15:45:46] Loaded.
[15:45:46] Loaded 3 plugins.
[15:45:46]
[15:45:46] Filterscripts
[15:45:46] ---------------
[15:45:46] Loaded 0 filterscripts.
[15:45:46] Error: Function not registered: 'Streamer_CallbackHook'
[15:45:46] Error: Function not registered: 'WP_Hash'
[15:45:46] Error: Function not registered: 'CreateDynamicObject'
[15:45:46] *** Streamer Plugin: Warning: Include file version (0x26105) does not match plugin version (0x27201) (script might need to be recompiled with the latest include file)
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:46] *** CreateDynamicObject: Expecting 12 parameter(s), but found 11
[15:45:47] =====================================
[15:45:47] | Infestation [Zombie roleplay ] |
[15:45:47] | *INITIATED* |
[15:45:47] | Version: Build 2 |
[15:45:47] | Creator: Stones |
[15:45:47] =====================================
[15:45:47] Number of vehicle models: 0
Re: Unable to find file or function -
Konstantinos - 22.05.2014
Like I said, you have to load nativechecker plugin last so you won't be getting the message 'Error: Function not registered'.
Re-compile your gamemode with the latest version of streamer.inc
In 2.7 version a new parameter has been added in CreateDynamicObject function and that's "drawdistance". You have to set a value for it and you'll get rid of those messages about expecting 12 parameters but found 11.
Re: Unable to find file or function -
Stones - 22.05.2014
As a example, would this be correct?
PHP код:
/ Natives (Objects)
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 200.0, Float:drawdistance = 200.0);
native DestroyDynamicObject(objectid);
native IsValidDynamicObject(objectid);
native SetDynamicObjectPos(objectid, Float:x, Float:y, Float:z);
native GetDynamicObjectPos(objectid, &Float:x, &Float:y, &Float:z);
native SetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz);
native GetDynamicObjectRot(objectid, &Float:rx, &Float:ry, &Float:rz);
native MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed, Float:rx = -1000.0, Float:ry = -1000.0, Float:rz = -1000.0);
native StopDynamicObject(objectid);
native IsDynamicObjectMoving(objectid);
native AttachCameraToDynamicObject(playerid, objectid);
native AttachDynamicObjectToVehicle(objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz);
native EditDynamicObject(playerid, objectid);
native GetDynamicObjectMaterial(objectid, materialindex, &modelid, txdname[], texturename[], &materialcolor, maxtxdname = sizeof txdname, ma
xtexturename = sizeof texturename);
native SetDynamicObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor = 0);
native GetDynamicObjectMaterialText(objectid, materialindex, text[], &materialsize, fontface[], &fontsize, &bold, &fontcolor, &backcolor, &textalignment, maxtext = sizeof text, maxfontface = sizeof fontface);
native SetDynamicObjectMaterialText(objectid, materialindex, const text[], materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
Re: Unable to find file or function -
Konstantinos - 22.05.2014
You need to add a value for
drawdistance parameter in your scripts. An example:
pawn Код:
CreateDynamicObject(1497, 2110.984130, -1864.980834, 13.914264, -22.000000, 90.000000, 269.521881, .drawdistance = 200.0);
// modelid | x | y | z | rot x | rot y | rot z | drawdistance | rest are default values