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") {
a = 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.