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?


All times are GMT +2. The time now is 12:26 PM.

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