hello world!
problem_1: by using ReadFile() func the server goes crushdown.
"[06/30 19:33:12] Unhandled Exception! Writing Minidump file.
This file with explanation and last lines from log files should be given to the development team.
Saved dump file to 'POL097-2008-02-26 Coregina-20100630193220-0.dmp'
Last Script: scripts/textcmd/player/testcom26.ecl PC: 7"
testcom26.src:
var array1 := ReadFile( "owners.txt" );
*owners.txt is placed in same folder with command.
fileacces.cfg:
FileAccess
{
AllowRead 1
AllowRemote 1
AllowWrite 1
AllowAppend 1
Package moneystone
Extension .txt
}
problem_2: WriteFile() func dont work.
WriteFile( "owners.txt", "this is a text!" );
WriteFile( ":occlo_game:owners.txt", "this is a text!" );
Maybe i did something wrong?!
need help with FILE.EM
Re: need help with FILE.EM
Old cores has a problem with readfile cross pkg and script folder.
You can migrate to 098.2 or 099Beta to solve this or use readfile inside pol/pkg/*pkg folder*/
Writefile use array of strings, like this:
WriteFile( "owners.txt", array {"this is a text!", "this is another text!"} );
TIP: Use broadcast (WriteFile( "owners.txt", "this is a text!" )); This will show the errortext in your Uo screen this case: "Invalid parameter type".
You can migrate to 098.2 or 099Beta to solve this or use readfile inside pol/pkg/*pkg folder*/
http://docs.polserver.com/pol099/fullfu ... #WriteFileWriteFile( "owners.txt", "this is a text!" );
WriteFile( ":occlo_game:owners.txt", "this is a text!" );
Writefile use array of strings, like this:
WriteFile( "owners.txt", array {"this is a text!", "this is another text!"} );
TIP: Use broadcast (WriteFile( "owners.txt", "this is a text!" )); This will show the errortext in your Uo screen this case: "Invalid parameter type".