Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - ysc3839

#31
Community Plugins / Re: Python plugin
Aug 16, 2018, 09:41 PM
Version 1.0.4:
  • Python error message will log to server_log.txt.
  • The plugin will read "pymodule" from both "server.cfg" and "server32/64.cfg".
Download: Linux Windows
#32
Community Plugins / Re: Python plugin
Aug 15, 2018, 08:13 PM
Added automated builds.
Linux Windows
No 32 bit builds for Linux.
#33
Community Plugins / Re: Python plugin
Aug 14, 2018, 04:19 PM
1.0.2 released: download

This version compatible with 04rel004.
If you call new functions it will raise "NotImplementedError: server does not implement this function".
And new callbacks do not exist.

Changed output name to vcmp-python-plugin-cpyxx-(rel/dbg)(32/64).
#35
ysc3839's VC:MP Launcher / Re: Preview 5
Aug 12, 2018, 03:34 PM
Added automated builds for my browser. You can download automated builds here.
Automated builds do NOT have multi-language support.
#36
Community Plugins / Re: Python plugin
Aug 09, 2018, 06:13 PM
Note: You may need to rename this plugin because the server can't take long filename.

31 characters length.
Plugin error >> dlopen() 'plugins/vcmp-python-plugin-cpy36-linux6.so' failed: plugins/vcmp-python-plugin-cpy36-linux6.so: cannot open shared object file: No such file or directory
Failed to load plugin: vcmp-python-plugin-cpy36-linux6
#38
General Discussion / Re: Javascript plugin
Aug 08, 2018, 08:57 PM
That's not what I want. I made Python plugin because Python have much libraries. We can use them instead of write another one.
#39
Off-Topic General / Re: what do these mean?
Aug 08, 2018, 02:42 PM
http://www.squirrel-lang.org/squirreldoc/reference/language/execution_context.html#variables
QuoteGlobal variables are stored in a table called the root table. Usually in the global scope the environment object is the root table, but to explicitly access the closure root of the function from another scope, the slot name must be prefixed with '::' (::foo).
If this code is in a class, '::' is necessary to access the global function.

Edit: It seems that I'm wrong?
class test_class
{
function print1()
{
::print("print1");
}

function print2()
{
print("print2");
}
}

function global_print1()
{
::print("global_print1");
}

function global_print2()
{
print("global_print2");
}

global_print1();
global_print2();

local test = test_class();
test.print1();
test.print2();
This code outputs:
[SCRIPT]  global_print1
[SCRIPT]  global_print2
[SCRIPT]  print1
[SCRIPT]  print2

This code shows differences:
class test_class
{
function print1()
{
::print("print1");
}

function print2()
{
print("print2");
}

function print(text)
{
::print("!!!" + text + "!!!");
}
}

function global_print1()
{
::print("global_print1");
}

function global_print2()
{
print("global_print2");
}

global_print1();
global_print2();

local test = test_class();
test.print1();
test.print2();
[SCRIPT]  global_print1
[SCRIPT]  global_print2
[SCRIPT]  print1
[SCRIPT]  !!!print2!!!
#40
General Discussion / Re: Javascript plugin
Aug 07, 2018, 09:18 AM
I wonder how you deal with asynchronous event loop?
As for Python, it requires a blocking event loop to run async code.So I have to run it on another thread.
Another problem is if it's safe to call server function on another thread?
#41
Error 126 means file not found. I guess you lost some dependent DLL. Upload plugins with error and let me see.
#42
ysc3839's VC:MP Launcher / Re: Preview 5
Jul 30, 2018, 08:53 AM
Some languages are need to be update. See https://www.transifex.com/ysc3839/vcmpbrowser/
#43
@umar4911 #8 It's possible.
#44
Github Pages or other free hosting? Be careful, you may receive DMCA notice and your account may be banned.
#45
Support / Re: readinistring
Jul 23, 2018, 06:32 PM
@Stormeus means: since you store an "executable code", you can simply store them in a nut and then use "dofile" to execute the code.
For example, if you use INI the file looks like:
[autosaved]
0=CreateObject(123, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);
1=CreateObject(456, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);

And if you use nut:
CreateObject(123, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);
CreateObject(456, 0, Vector(1, 2, 3), 200).RotateToEuler(Vector(1, 2, 3), 1);