problem script

Started by Dejv, Nov 19, 2016, 02:14 PM

Previous topic - Next topic

Dejv

WTF?



:( error, I have newest versions client or server...

vito

the index 'Script' does not exist

EK.IceFlake

The '::' operator inserts a function into a class.
You don't have the class 'Script', as it does not exist within the plugin and you didn't create it yourself.
You also don't have the class 'Console', nor the function 'Print' within a class.

tl;dr You are attempting to use client side scripts on server side. Move this file to /store/script/main.nut.
Or change it to this:
function onScriptLoad()
{
    print("test!");
}

Also don't use pawno, use something such as Visual Studio code

KAKAN

Dejv, put that file in youserverdir/store/scripts
I guess you're trying to use client side scripting, if so, use that path.
oh no

Dejv


.

Quote from: Dejv on Nov 19, 2016, 07:26 PMI have.

Then why are you trying to load it in the server? It is a CLIENT script, wouldn't it make sense that it was meant to be loaded by the CLIENT and not the SERVER?
.

Dejv

And you explain to me how to load it?

Sorry for my bad English.

.

Unfortunately the structure of this whole forum is a cluster f*. So I can't blame it on you. I had issues with this myself (go figure). To find the exact information you have to go back through the change-log and pay very close attention to single line of text. And only because I know that already. For something this important you'd think it'll be in plain sight. But oh well.

Either way, you name it `main.nut` and place it in `store/scripts` when you connect to the server, your client will download whatever is in that folder automatically. Once the client finished downloading the files. It'll look for a file named `main.nut`. And if it finds that file it'll attempt to load it. From inside `main.nut` you can further load other files.

Was that clear enough?
.

Thijn

Quote from: Dejv on Nov 19, 2016, 07:43 PMAnd you explain to me how to load it?

Sorry for my bad English.
Just put the file in store/scripts and when you join it will automatically be loaded.