|
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Sun Dec 11, 2005 9:53 am
LDMuds coding and putfile/getfile |
Hello
Recently I've started to code LPC mud and I have problem with putfile/getfile to/from mud. (putfile/getfile are my aliases that I've coded in the way they are in TF (sic!) ).
The problem is when file is big - over 10kB.
Trying to get such a file I get *** Text lost in transmition ***.
Is there a way to fix that 'text lost' and improve connection?
Rgds, W. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Dec 13, 2005 1:24 am |
How exactly does putfile and getfile work with that mud?
I've been using a web based UI far too long. |
|
|
|
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Tue Dec 13, 2005 9:45 am |
It is just symulation of using 'ed' on LDMuds.
My script looks like:
Code: |
#CLASS {Dune|Wizard|Files}
#ALIAS getFile {#IF (%len(%1)) {#T+ getFileTrg1;#VARIABLE getFileName %1;#SEND {ed %1}}}
#ALIAS putFile {#PRI {#IF (%len(%1)) {#VARIABLE putFileName %1;#SEND {cp %concat(@curDirectory, "/", @putFileName) %concat("/players/absurd/backup/",@putFileName,".",%time(yymmddhhnn))};#SEND {ed %concat(@curDirectory, "/", @putFileName)};#SEND {1,$d};#SEND {a};#SEND %replace(%concat(@rootFileDir, @curDirectory, "/", %if(@putFileName="CHANGE","CHANGE.txt",@putFileName)),"/","\");#SEND {.};#SEND {w};#SEND {q};#IF (%right(@putFileName,%len(@putFileName)-2) = ".c") {#SEND {compile %concat(@curDirectory, "/", @putFileName)};#SEND {update %concat(@curDirectory, "/", @putFileName)}};#IF (%right(@putFileName,%len(@putFileName)-2) = ".h") {#SEND {compile %concat(@curDirectory, "/", @putFileName)}}}}}
#VAR rootFileDir {C:/Waldek/zMud/Dune/Files/SRC} {C:/Waldek/zMud/Dune/Files/SRC}
#VAR getFileName {} {}
#VAR curDirectory {/players/absurd} {}
#VAR putFileName {} {}
#REGEX "getFileTrg2" {^:Exit from ed\.$} {#LOG;#T- getFileTrg2} "" {disable}
#REGEX "getFileTrg1" {^(.*)} {#IF ("%1" = ":") {#T- getFileTrg1;#IF (@getFileName & @curDirectory) {#T+ getFileTrg2;#SEND {1,$p};#SEND {q};#LOG %concat(@rootFileDir,@curDirectory,"/",@getFileName) new}}} "" {prompt|disable}
#REGEX {^Current directory: (.*)$} {#VARIABLE curDirectory %1} "" {disable}
#REGEX {^Absurd@(.*)>$} {#VARIABLE curDirectory %1}
#CLASS 0
|
I had to make workaround for trigger for single ':' because it doesn't worked (tried everything, regexp and old-way, special chars etc).
Rgds, W. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Dec 13, 2005 1:50 pm |
#SEND {1,$d}
How big is variable $d?
How is variabe $d storing information?
I'm assuming its there that is too fast for transmissing. |
|
|
|
yelayon Novice
Joined: 15 Mar 2005 Posts: 42
|
Posted: Tue Dec 13, 2005 2:37 pm |
1,$d means display lines from first (number: 1) to the last line (sign: $) and 'd' is just display command for 'ed'.
Those are parameters to LDMud's 'ed' editor.
Result is that whole file is displayed as mud output.
And aprox. if file is 10kB or bigger I got *** TEXT LOST .... *** info.
W. |
|
|
|
TonDiening GURU
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|