Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


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 02:45 PM.


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