Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-21-2007, 03:51 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
Problem with reading file.

I encountered a problem when trying to read a file with loadLines.. or well, the same thing worked one day earlier and I havent touched it.


Heres how the file looks like:

PHP Code:
"White Pants",1,Pants,White,0,0,
 Sacks
,1,Sacks,0,0,0,
and its named xXziroXx_items.arc. Here's how I try to read it, along with what it returns:

PHP Code:
temp.items.loadLines(temp.folder player.account "_items.arc");

temp.items echoes:

Sacks,"White Pants" 

I asked Skyld about it, and he did not know what could be wrong. I tried restarting the NPC-Server and /refreshfilelist but none worked. He suggested I post it on the forum so that Stefan can see it.

Need help asap.
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #2  
Old 01-21-2007, 03:55 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Need help asap.
Are you saving vars or just lines? If you're saving vars use
HTML Code:
object.savevars("folderPlace", type);
loading them use
HTML Code:
object.loadvars("folderPlace", type);
If you're not using save/loadvars, why're you using loadlines?
Reply With Quote
  #3  
Old 01-21-2007, 03:57 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
I use loadLines because it works exactly like I need it to work. And you missed where I wrote:

"the same thing worked one day earlier and I havent touched it."
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #4  
Old 01-21-2007, 04:01 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
I would guess there is some other code between the loadlines and echo? If you just do loadlines and echo it should display more
Reply With Quote
  #5  
Old 01-21-2007, 04:02 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
There's not. The row below the loadLines was the echo().
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #6  
Old 01-21-2007, 05:36 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
Quote:
Originally Posted by xXziroXx View Post
I encountered a problem when trying to read a file with loadLines.. or well, the same thing worked one day earlier and I havent touched it.


Heres how the file looks like:

PHP Code:
"White Pants",1,Pants,White,0,0,
 Sacks
,1,Sacks,0,0,0,
and its named xXziroXx_items.arc. Here's how I try to read it, along with what it returns:

PHP Code:
temp.items.loadLines(temp.folder player.account "_items.arc");

temp.items echoes:

Sacks,"White Pants" 

I asked Skyld about it, and he did not know what could be wrong. I tried restarting the NPC-Server and /refreshfilelist but none worked. He suggested I post it on the forum so that Stefan can see it.

Need help asap.
You could make the arc file look like:

PHP Code:
Item1="White Pants",1,Pants,White,0,0,
Item2
=Sacks,1,Sacks,0,0,0,
I dunno if it is that you are trying to do, but if it was like that, you could use loadvars
__________________
Reply With Quote
  #7  
Old 01-21-2007, 05:39 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Chompy View Post
You could make the arc file look like:

PHP Code:
Item1="White Pants",1,Pants,White,0,0,
Item2
=Sacks,1,Sacks,0,0,0,
I dunno if it is that you are trying to do, but if it was like that, you should use loadvars
Hehe
Reply With Quote
  #8  
Old 01-21-2007, 05:55 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
Quote:
Originally Posted by Chandler View Post
Hehe
__________________
Reply With Quote
  #9  
Old 01-21-2007, 08:16 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
Yes, I could do that, but at the moment I dont. Stefan, any thoughts on what the problem is?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #10  
Old 01-21-2007, 08:27 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
The only thing I see that it don't load arrays with load lines,
so maybe making it like:

PHP Code:
"White Pants":1:Pants:White:0:0:
 Sacks
:1:Sacks:0:0:0:
and then use obj.tokenize( ":");

only thing I can think of..

(loadlines don't like comma's I think )
__________________
Reply With Quote
  #11  
Old 01-22-2007, 03:31 AM
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
What part of it all working fine a day ago did you all miss? Not me, not Skyld, not anyone Ive asked know why its not working. Might have anything to do with the NPC-Server being mysteriously offline when I logged on RC today?

Like I said, I do NOT know why it STOPPED working all the sudden, so can you please take a look at it Stefan?
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
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 09:21 AM.


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