Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-08-2008, 06:42 PM
RozenMaiden RozenMaiden is offline
Registered User
Join Date: Dec 2008
Posts: 27
RozenMaiden is on a distinguished road
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?
Reply With Quote
  #2  
Old 12-08-2008, 06:51 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
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"?
__________________
Reply With Quote
  #3  
Old 12-08-2008, 07:08 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
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").
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #4  
Old 12-08-2008, 07:41 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
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.
Reply With Quote
  #5  
Old 12-08-2008, 07:54 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
It looks like he wanted to show a level sign by index to me.
Reply With Quote
  #6  
Old 12-08-2008, 08:03 PM
RozenMaiden RozenMaiden is offline
Registered User
Join Date: Dec 2008
Posts: 27
RozenMaiden is on a distinguished road
Quote:
Originally Posted by Loriel View Post
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
Reply With Quote
  #7  
Old 12-08-2008, 09:23 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Ah, I didn't pay attention to if it was say or say2, considering I've practically only used the latter. Ever.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #8  
Old 12-08-2008, 09:47 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by xXziroXx View Post
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
Reply With Quote
  #9  
Old 12-08-2008, 11:36 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
loadfolder("path/to/file/*", true); should work
__________________
Reply With Quote
  #10  
Old 12-09-2008, 12:25 AM
RozenMaiden RozenMaiden is offline
Registered User
Join Date: Dec 2008
Posts: 27
RozenMaiden is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
loadfolder("path/to/file/*", true); should work
nope, nothing
Reply With Quote
  #11  
Old 12-09-2008, 11:13 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by RozenMaiden View Post
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.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #12  
Old 12-09-2008, 11:55 PM
RozenMaiden RozenMaiden is offline
Registered User
Join Date: Dec 2008
Posts: 27
RozenMaiden is on a distinguished road
Quote:
Originally Posted by LoneAngelIbesu View Post
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
Reply With Quote
  #13  
Old 12-10-2008, 12:24 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by RozenMaiden View Post
well, i don't want it server-based
If you're saving data to files clientside, then you have no choice.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #14  
Old 12-10-2008, 12:41 AM
RozenMaiden RozenMaiden is offline
Registered User
Join Date: Dec 2008
Posts: 27
RozenMaiden is on a distinguished road
Quote:
Originally Posted by LoneAngelIbesu View Post
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
Reply With Quote
  #15  
Old 12-10-2008, 12:49 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by RozenMaiden View Post
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?
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:25 PM.


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