Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Second-Sub-Folder? (also say();) (https://forums.graalonline.com/forums/showthread.php?t=83068)

RozenMaiden 12-08-2008 06:42 PM

Second-Sub-Folder? (also say();)
 
Hi,

when I do something lik
PHP Code:

temp.alist.loadfolder"scriptfiles/blub/*"); 

it works fine
but for
PHP Code:

temp.alist.loadfolder"scriptfiles/blub/ll/*"); 

it would return nothing... any solution? yeah the folders do exist. It is a clientside script too


and second:
I made a sign and tried to do
PHP Code:

//#CLIENTSIDE
function onCreated()
  {
  
showcharacter();
  }
function 
onPlayerTouchsMe()
  {
  
say);
  } 

but that doesn't work. Any ideas?

Chompy 12-08-2008 06:51 PM

For the loadfolder() part, try using 1 instead of 0

And for the say2(), what are you trying to do? Make the sign say "0"?

xXziroXx 12-08-2008 07:08 PM

For the sign part, 0 is considered as nothing at all, thus will be treated as such. If you want it to show 0, treat it as a string ("0").

Crow 12-08-2008 07:41 PM

May I remind you that say(index) will show the sign text of a level sign with the specified index? You should use say2(string) instead.

Loriel 12-08-2008 07:54 PM

It looks like he wanted to show a level sign by index to me.

RozenMaiden 12-08-2008 08:03 PM

Quote:

Originally Posted by Loriel (Post 1447833)
It looks like he wanted to show a level sign by index to me.

Yeah, thats why I used say instead of say2

loadfolder still doesn't work, even with 1 instead of 0

xXziroXx 12-08-2008 09:23 PM

Ah, I didn't pay attention to if it was say or say2, considering I've practically only used the latter. Ever.

Loriel 12-08-2008 09:47 PM

Quote:

Originally Posted by xXziroXx (Post 1447860)
Ah, I didn't pay attention to if it was say or say2, considering I've practically only used the latter. Ever.

I kind of assumed support for say was silently dropped at some point since g2k2

cbk1994 12-08-2008 11:36 PM

loadfolder("path/to/file/*", true); should work

RozenMaiden 12-09-2008 12:25 AM

Quote:

Originally Posted by cbk1994 (Post 1447901)
loadfolder("path/to/file/*", true); should work

nope, nothing

LoneAngelIbesu 12-09-2008 11:13 PM

Quote:

Originally Posted by RozenMaiden (Post 1447920)
nope, nothing

The scriptfiles (a clientside) directory goes: scriptfiles/server name/path/to/folder.

So, you should be using:
PHP Code:

temp.alist.loadfolder("blub/ll/*"0); 

Which will load the files from: scriptfiles/server name/blub/ll.

You don't need to put scriptfiles or your servername, when using loadfolder() on clientside, I believe. Correct me if I'm wrong, somebody who knows.

RozenMaiden 12-09-2008 11:55 PM

Quote:

Originally Posted by LoneAngelIbesu (Post 1448196)
The scriptfiles (a clientside) directory goes: scriptfiles/server name/path/to/folder.

So, you should be using:
PHP Code:

temp.alist.loadfolder("blub/ll/*"0); 

Which will load the files from: scriptfiles/server name/blub/ll.

You don't need to put scriptfiles or your servername, when using loadfolder() on clientside, I believe. Correct me if I'm wrong, somebody who knows.

well, i don't want it server-based

LoneAngelIbesu 12-10-2008 12:24 AM

Quote:

Originally Posted by RozenMaiden (Post 1448216)
well, i don't want it server-based

If you're saving data to files clientside, then you have no choice. ;)

RozenMaiden 12-10-2008 12:41 AM

Quote:

Originally Posted by LoneAngelIbesu (Post 1448230)
If you're saving data to files clientside, then you have no choice. ;)

Well, why not? Especially since loadfolder worked for searching ll.txt in scriptfiles/blub/*.txt

LoneAngelIbesu 12-10-2008 12:49 AM

Quote:

Originally Posted by RozenMaiden (Post 1448237)
Well, why not? Especially since loadfolder worked for searching ll.txt in scriptfiles/blub/*.txt

When you save data to a file on the clientside, it automatically saves it to the server's folder within scriptfiles. For example, savelines("test/file.txt", 0); will save file.txt to serverfiles/Valikorlia/test/file.txt, on Valikorlia.

Why is it such a big deal that they're saved in sub-folders?

RozenMaiden 12-10-2008 02:59 PM

Hm well then I'll go without subfolders, though that will get messy with 60+ files xD

Crow 12-10-2008 05:32 PM

Quote:

Originally Posted by RozenMaiden (Post 1448337)
Hm well then I'll go without subfolders, though that will get messy with 60+ files xD

What's the matter? I don't think you understand. Graal will create a folder with the name of the playerworld, for basically everything on clientside (should it include file/folder modification) in the scriptfiles folder. You cannot avoid that.
Are folder names really that important to you?

RozenMaiden 12-10-2008 05:37 PM

Quote:

Originally Posted by Crow (Post 1448359)
What's the matter? I don't think you understand. Graal will create a folder with the name of the playerworld, for basically everything on clientside (should it include file/folder modification) in the scriptfiles folder. You cannot avoid that.
Are folder names really that important to you?

Well they aren't but I didn't want it server-based :p

Crow 12-10-2008 05:48 PM

Quote:

Originally Posted by RozenMaiden (Post 1448362)
Well they aren't but I didn't want it server-based :p

Do you want to create something you can use on several servers?

RozenMaiden 12-10-2008 06:14 PM

Quote:

Originally Posted by Crow (Post 1448363)
Do you want to create something you can use on several servers?

ya
well atleast that shares its data if the script is used on 2 servs

xXziroXx 12-10-2008 06:34 PM

Can always use an IRC channel to synchronize data in between servers.

RozenMaiden 12-10-2008 06:41 PM

Well its not between servers, more like a script should be able to access teh same data (saved on the players pc) from several servers

xXziroXx 12-10-2008 06:42 PM

Well, I don't really have any experience with file manipulation clientsided, but if that doesn't work out as you want you can always use requestURL to send/load personalized data from a webserver (assuming you have access to one).


All times are GMT +2. The time now is 09:37 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.