Thread: loadlines
View Single Post
  #5  
Old 12-11-2006, 03:59 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by coreys View Post
I'm trying to use loadlines to make a kind of web browser for txt files in the folder "levels/sites/account_pagename.txt"

I don't really know quite what I'm doing though, and this is just returning 0:
PHP Code:
function onActionServerSide() {
  if (
params[0] == "loadpage") {
    
findPlayer(params[1]);
    
a.client.browserview.loadLines("sites/"@params[1]@"_"@params[2]@".txt");
    
sendtorc("Testing browser: "@a.clientr.browserview);
  }

For testing purposes, params[1] is the account and params[2] is mainweb. So it should be looking up "levels/sites/coreys_mainweb.txt" which does exist. It is:
NPC Code:
<center><h1>Vash-Aniki</h1></center>



I've tried both levels/sites/ and just sites/. Neither have worked.
PHP Code:
function onActionServerSideactionp1p2) {
  switch ( 
action) {
    case 
"loadpage":
      
pl findPlayerp1);
      
temp.lines.loadLines"levels/sites/" pl.account "_" p2 ".txt");
      
pl.client.browserview temp.lines;
      echo( 
pl.client.browserview);
      break;
  }

__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote