JezuzLizard / T4SP-Server-Plugin

A plugin that has code that hopefully compiles and the game will load it to do things. Stability not guaranteed.
GNU Affero General Public License v3.0
4 stars 2 forks source link

"readfile" and "writefile" does not seem to work #60

Closed unknown43253252352352 closed 9 months ago

unknown43253252352352 commented 10 months ago

I am either doing something wrong or the plugins readfile and writefile gsc options does not work. I get unknown function error when adding the functions to my gsc script. Any help would be appreciated.

Code seems to be there. image

ineedbots commented 10 months ago

These were removed; you can use the plutonium's implementation of filewrite and fileread

ineedbots commented 10 months ago

if plutonium's functions dont work well enough for you, I can add a fileio interface to this plugin

unknown43253252352352 commented 10 months ago

These were removed; you can use the plutonium's implementation of filewrite and fileread

Is there any documentation about the plutonium ones? I have never heard of them and have no idea if they work same way as the t6/t5 plugin functions.

By any change you could add the setclantag and setname from t6 gsc utils? I saw some one asking it for t5 utils aswell.

unknown43253252352352 commented 10 months ago

if plutonium's functions dont work well enough for you, I can add a fileio interface to this plugin

Small script i tested with and no output was written. I might be doing something wrong ofcourse but that is pretty much t5/t6 plugin handled it.

#include maps\_utility; 
#include common_scripts\utility;
#include maps\_hud_util;
#include maps\_zombiemode_utility;
init()
{
    file = getDvar("fs_homepath") + "\\test.txt";
    filewrite(file, "Hello");
    wait 15;
    get_players()[0] iPrintLn(file);
}   
ineedbots commented 10 months ago

you dont need to append the fs_homepath for the filename

unknown43253252352352 commented 10 months ago

you dont need to append the fs_homepath for the filename

That was to ensure the path but there is no output even without it.

unknown43253252352352 commented 9 months ago

I have not found anyway to get the plutonium's implementation of filewrite and fileread work. Could anyone help me with that or add the functions to the plugin?

ineedbots commented 9 months ago

I will write the new functions here soon

ineedbots commented 9 months ago

Latest has the cod4x script functions

https://github.com/callofduty4x/CoD4x_Server/blob/master/scriptdocumentation/script_functions_reference.md#file-operations

ineedbots commented 9 months ago

One limitation is that all fileio MUST take place in the scriptdata folder

ineedbots commented 9 months ago

image

unknown43253252352352 commented 9 months ago

Thank you for adding these functions.

anotheruselesaccount commented 4 months ago

This still give unknown function error when adding filehandle = fs_fopen("test.txt", "write"); to my gsc or any other of the functions. image

@ineedbots Am i doing somethign wrong since in console it says plugin loaded but the custom gsc functions does not work when joining server.

(Issue on my end. server and client tried both load plugin functions )