Closed maxpain closed 10 years ago
but on version 3.25.0 this is compilng! After compiling the plugin is not loading via metamod.
I really want to test it now :)
addons <> plugins, check the folder you fixed :)
This plugin exists in two folders plugins/hldsv8/hldsv8_i386.so addons/hldsv8/hldsv8_i386.so badf load...
Are there any error messages in the logs?
No
LD_LIBRARY_PATH is valid?
My start script contains: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${CS}
At startup, hlds creates two log files, one before worldspawn and one after. V8 loads before, so error messages may appear in the first log file.
Can I give you SSH access?
Sure, my pub key is:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQBRv+ktEc0KJmqx+8kLL6l5wb6xrr+9948BHDdxmUr3WzL6JxJ0U2yz7d/qAdIVsaEI2WKxmMs6z+Pxh8LBfaKMHQfFtg6T0jiK6nbACz42XwOkwSs5b4hpiw3COo2OxHba26ssa+JxyeoBR/5xFuf3SecSIOGf+BU2qZwlS+QRP54qyjUcz6sUib7+KbZQJAcmGGbUi+vlEVZrMbGHqfG6mTTNDrQ9ij9mFfsrCPpXqAb4y9eeTT3CGy/SPAnMyyTaQSIuhARt1T9MHgKjepxQndmkkSNYmbIlwgaE9xPy6ZRCp9H+5AGFGOkCVxaZKvsq6wOhxMsrVDC/CrfXjGMh rsa-key-20070105
added. ip: comeback.pro hlds path: /home/maxpain177/hlds/comeback.hlds/cs16 sources path: /home/maxpain177/dev
checkin'
try please
Yes, there is an error at startup: undefined symbol: _ZN2v86Object3NewEPNS_7IsolateE
What is the reason?
Don't know yet.
Ok. Thanks again for such a great job. Sorry for the mistakes in the sentences. I do not know much English (I live in Russia)
I think the problem is that hlds loads /usr/lib/libv8.so first, which has different API (v8::Object::New()), the new version contains v8::Object::New(v8::Isolate*). I don't know yet how to force to load the new libv8 (export LD_LIBRARY_PATH=${CS}:${LD_LIBRARY_PATH} did'nt help), but unfortunately i have to got to a meeting now. If the host remains up, i will try some ideas later (or tomorrow).
V8 API is unstable. Which version you used to compile when it worked?
2014-03-05: Version 3.25.4
anyway does not work
Hey,
[ 1] v8 RUN - hldsv8_i386.so v0.56.13 ini ANY Pause
The problem was, that hldsv8 was built against the older libv8 (ld ... -lv8), but since you removed the package i copied the newly compiled libv8 to /usr/lib/, rebuilt hldsv8, and voila :)
thank you very much
You're welcome!
Where do I upload my scripts?
At hldsv8_common.cpp:402 you can specify, currently it is /home/cstrike/inst/debug/cstrike/plugins/hldsv8/scripts/test.js
only one script file?
Yes - really really alpha :)
It`s really really perspectively =)
description stat pend file vers src load unlod
[ 1] v8 RUN - hldsv8_i386.so v0.56.13 ini ANY Pause
meta unpause v8
Unpause failed for plugin 'v8'
Why v8 in pause? /home/cstrike/inst/debug/cstrike/plugins/hldsv8/scripts/test.js - dont work...
Yes, there is a bug in file reading, if you see "SyntaxError: Unexpected token ILLEGAL" in the logs, you should do an extra newline to the script's end. Try now.
Where i can see logs?
cstrike/logs/
L 04/09/2014 - 15:42:38: Log file started (file "logs/L0409006.log") (game "cstrike") (version "48/1.1.2.7/Stdio/6132")
L 04/09/2014 - 15:42:38: [META] Metamod v1.20 2013-02-16
L 04/09/2014 - 15:42:38: [META] by Will Day <willday@metamod.org>
L 04/09/2014 - 15:42:38: [META] http://www.metamod.org/
L 04/09/2014 - 15:42:38: [META] compiled: Feb 16 2013, 17:11:35 +0100 (optimized)
L 04/09/2014 - 15:42:38: [META] engine: i486
L 04/09/2014 - 15:42:38: [META] Recognized game 'cstrike'; using dllfile 'cs.so'
L 04/09/2014 - 15:42:38: [META] Game DLL for 'Counter-Strike' loaded successfully
L 04/09/2014 - 15:42:38: [META] ini: Begin reading plugins list: /home/maxpain177/hlds/comeback.hlds/cs16/cstrike/addons/metamod/plugins.ini
L 04/09/2014 - 15:42:38: [META] ini: Read plugin config for: v8
L 04/09/2014 - 15:42:38: [META] ini: Finished reading plugins list: /home/maxpain177/hlds/comeback.hlds/cs16/cstrike/addons/metamod/plugins.ini; Found 1 plugins to load
L 04/09/2014 - 15:42:38: [META] dll: Loading plugins...
L 04/09/2014 - 15:42:38: [META] dll: Loaded plugin 'v8': hlds-v8 v0.56.13 2014-03-13, DeeJayy <deejayy@deejayy.hu>
L 04/09/2014 - 15:42:38: [META] dll: Finished loading 1 plugins
L 04/09/2014 - 15:42:38: [HLDSV8] No GameInit defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ServerActivate defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CmdStart defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ClientCommand defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ServerDeactivate defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No PlayerPreThink defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No Think defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No PlayerPostThink defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No Touch defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No StartFrame defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CmdEnd defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ClientDisconnect defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ClientKill defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ClientPutInServer defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SpectatorConnect defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SpectatorDisconnect defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SpectatorThink defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ClientUserInfoChanged defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarRegister defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarGetFloat defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarGetString defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarSetFloat defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarSetString defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No CVarGetPointer defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No AlertMessage defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No AllocString defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No ServerCommand defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No RegUserMsg defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No LoadFileForMe defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No AddServerCommand defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No InfoKeyValue defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SetKeyValue defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SetClientKeyValue defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No Info_RemoveKey defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No GetPhysicsKeyValue defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No SetPhysicsKeyValue defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No GetPlayerAuthId defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No GetPlayerUserId defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No FindEntityByString defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No PlaybackEvent defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No EmitSound defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No MessageBegin defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No MessageEnd defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteByte defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteChar defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteShort defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteLong defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteAngle defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteCoord defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteString defined in script!
L 04/09/2014 - 15:42:38: [HLDSV8] No WriteEntity defined in script!
L 04/09/2014 - 15:42:38: Log file closed
Yes, this is how a script loads normally. I fixed it 4 you :)
/home/cstrike/inst/debug/cstrike/plugins/hldsv8/scripts/test.js
function ClientConnect(params) {
console.log('A client connected! Name: ' + params.name + ', ip: ' + params.address);
};
When i connecting to server for test it - nothing happens :)
oops.
log on
YES!!! It really works!!!! v8 in hlds!!!!!!
Where i can see callbacks, eg. ClientConnect(params)?
# egrep "v8c_CheckCallbackIsDefined" hldsv8.cpp
All callbacks got only one parameter.
# egrep "v8Common ->Set" hldsv8_common.cpp
This displays invokable hlds engine functions from V8.
Good.
Now i can send info to website on meteor.js (framework for node.js) via websockets/xhr/etc.?
All callbacks got only one parameter.
Can i see array options in params, eg. console.log(params)?
V8 is a very bare JS environment what only implements the current ECMA standard. Node.JS is much more than this.
I'm looking for a way to embed the whole node ecosystem, but with no luck. Anyway, i don't give up yet.
Yes, console.log(params)
will log the params
object.
For making this easier, paste this snippet in your test.js:
Object.prototype.toString = function ()
{
var ret = 'Object dump: \n';
for (var key in this) {
ret += ' ' + key + ': ' + this[key] + '\n';
}
return ret;
}
node ecosystem
This means that it is possible to use npm-modules?
Yup, all of it :) That's the plan.
very nice. all works. thank you again. No more questions :)
but I still want to send data to my website :)