Qbasicnews.com

Full Version: was around Print on every line
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
is there away i can get around haveing to put print on every line?
Solance,
What do you mean?
"Put print on every line" when you are doing what?
What is this program doing?
*****
its like a compiler that will compile a script for you but i keep getting error when i try and test it "mis match error"[/code]
ok i fixed the errors but when it runs and where is have

Code:
Open main.as for input as #1
open main.as for output as #2

i get a file already open message
you should use different names for files. You can't read and write to the same file at the same time. If you want to modify a file, you have do make a copy or deal with in on memory.
thats what i am trying to do is modify the file how would i go about doing it?
It deppends on the file and data you are daling with, but you better open a different one for output and when you are done delete the original and rename the new with the same name as the original.
Code:
PRINT "This is a main.as script Creator version 1.0"
PRINT "be sure to check for more customizeable versoins at www.asoki.distanthost.com"; ""
INPUT "Games name"; gna
INPUT "max maps"; mmaps
INPUT "max players Online"; mpla
INPUT "Message of the day"; motd
PRINT "thank you for useing this program please wait"
Ser$ = "call setservername(server name)"
rep$ = "call setservername(" + gna + ")"
OPEN main.as FOR INPUT AS #1
OPEN main.as FOR OUTPUT AS #2
Ser$ = "call setmaxmaps(500)"
rep$ = "call setmaxmaps(" + mmaps + ")"
OPEN main.as FOR INPUT AS #1
OPEN main.as FOR OUTPUT AS #2
SER$ = "call setmaxplayers(20)"
REP$ = "call setmaxplayers(" + mpla + ")"
open main.as for input as #1
open main.as for output as #2
SER$ = "call setmotd(sample motd)"
REP$ = "call setmotd(" + motd + ")"
open main.as for input as #1
open main.as for output as #2
[quote]

what should i change ???

i dont really understand what you said[/quote]
Code:
PRINT "This is a main.as script Creator version 1.0"
PRINT "be sure to check for more customizeable versoins at www.asoki.distanthost.com"; ""
INPUT "Games name"; gna
INPUT "max maps"; mmaps
INPUT "max players Online"; mpla
INPUT "Message of the day"; motd
PRINT "thank you for useing this program please wait"
Ser$ = "call setservername(server name)"
rep$ = "call setservername(" + gna + ")"
OPEN main.as FOR INPUT AS #1
OPEN main.as FOR OUTPUT AS #2
Ser$ = "call setmaxmaps(500)"
rep$ = "call setmaxmaps(" + mmaps + ")"
OPEN main.as FOR INPUT AS #1
OPEN main.as FOR OUTPUT AS #2
SER$ = "call setmaxplayers(20)"
REP$ = "call setmaxplayers(" + mpla + ")"
open main.as for input as #1
open main.as for output as #2
SER$ = "call setmotd(sample motd)"
REP$ = "call setmotd(" + motd + ")"
open main.as for input as #1
open main.as for output as #2

what should i change ???

i dont really understand what you said
edit button, try not duoble posting

edit: i dont understand your code. whats it exsposed to do?
Pages: 1 2