View Single Post
  #14  
Old 06-19-2013, 09:15 AM
Julien Julien is offline
Registered User
Join Date: Jun 2013
Posts: 8
Julien is on a distinguished road
Quote:
Originally Posted by Gunderak View Post
Failed completely :/
PHP Code:
public function NewRC(acc){
  
//Let NC messages send first..
  
sleep(5);
  
temp.comment this.GetComments(acc);
  if(
md5(comment) != this.(@acc)){
    
acc.sendtorc("Your comments have changed since you last logged on.");
  }
  
this.(@acc) = md5(comment);
}
function 
GetComments(ac){
  
temp.st temp.ac.substring(02);
  
temp.path format("accounts/%s/%s.txt"stac);
  
temp.file.loadstring(temp.path);
  
temp.file temp.file.tokenize("\r\n");
  
temp.comments;
  for(
temp.line temp.file){
    if(
line.starts("COMMENTS")){
      return 
line.substring(9);
    }
  }
  return 
"none";

Hello,

After trying the above code on http://graalscript3.graalonline.com/, it reports successful conversion.
The conversion is not really perfect though. For example, the converter tool cannot guess the type of the "acc" parameter in the "NewRC" function.

When checking syntax, several errors are reported.
Some errors are valid, others are not (for example "md5" function is not supported yet).

Could you please detail what is going wrong on your side?
Do you have any error reported? Is the conversion running forever maybe?
Reply With Quote