Thread: Uploadfile();?
View Single Post
  #6  
Old 04-07-2012, 10:34 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Gunderak View Post
Well now I'm having an issue saving the string to a file..
It worked before but now it has stopped working o.o
Here is the part that is problematic.
PHP Code:
function GetFiles(){
  
this.ply player.account;
  
temp.req requesturl("http://wr3ckless.net/corinthia/getfiles.php");
  
thiso.catchevent(req"onReceiveData""onGot");
}
function 
onGot(req){
  
temp.url "http://www.wr3ckless.net/corinthia/";
  
temp.dat req.fulldata;
  for(
temp.0temp.dat.size(); temp.++){
    
temp.file requesturlasgamefile(url@dat[f], dat[f], 0false);
    
temp.dat temp.file.fulldata;
    
temp.dat.savestring("levels/"@dat[f], 0);
    
sleep(1);
  }

It isn't creating a file, yet before it was.
And yes the control NPC has rw rights.
You'll need to at least tokenize req.fulldata in order to access it as an array. Here's an example:
PHP Code:
  temp.dat req.fulldata.tokenize(","); 
And even doing that won't guarantee that it'll work. It's just one thing I noticed. Also I don't know why you're using the same variable name inside of the for loop as the array that you're looping through.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote