View Single Post
  #1  
Old 01-09-2012, 09:39 PM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Problem with loading string?

For my script, I'm reading the contents of a text file and displaying it in a GUI.
However, for some bizzare reason, I can only load the contents of the text file using loadlines(). If I try loadstring(), it will not work. It won't even echo the second time at all.

PHP Code:
function onActionGetNews(){
  
  
temp.l.loadlines("levels/server_news.txt");
  echo(
"Lines: "@temp.l);
  
temp.s.loadstring("levels/server_news.txt");
  echo(
"String: "@temp.s);

Before you ask, the npcserver already has rw levels/*
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote