Page 1 of 1

'lil help please

Posted: Fri May 23, 2003 9:09 pm
by PhattyB
infoscroller:
wait 30.0
iprintln "Welcome to...blah blah"
wait 1.0
iprintln "www.whatever.com"
wait 1.0
iprintln "IP: xxx.xxx.xxx.xxx"
wait 300.0
goto infoscroller

This code actually double prints...output looks like:
Welcome to...blah blah
Welcome to...blah blah
www.whatever.com
www.whatever.com
IP: xxx.xxx.xxx.xxx
IP: xxx.xxx.xxx.xxx

Anyone know why it is double printing?

Posted: Fri May 23, 2003 10:57 pm
by Parts
it's running your thread twice.
Two posibilities

either you have the line "Thread infoscroller" in twice or you are missing an end. you might have something like shown below:

Code: Select all

Main:

...
...
etc
etc
...
Thread infoscroller


nfoscroller: 
wait 30.0 
iprintln "Welcome to...blah blah" 
wait 1.0 
iprintln "www.whatever.com" 
wait 1.0 
iprintln "IP: xxx.xxx.xxx.xxx" 
wait 300.0 
goto infoscroller




what you need is:

Code: Select all

Main:

...
...
etc
etc
...
Thread infoscroller

end

nfoscroller: 
wait 30.0 
iprintln "Welcome to...blah blah" 
wait 1.0 
iprintln "www.whatever.com" 
wait 1.0 
iprintln "IP: xxx.xxx.xxx.xxx" 
wait 300.0 
goto infoscroller

end



Posted: Sat May 24, 2003 3:05 am
by PhattyB
okay, global/DMprecache is:

cache models/weapons/colt45.tik
//....
//cut out bulk of cache
//....
cache models/player/german_worker.tik
cache models/player/german_worker_fps.tik

exec global/infoscroller.scr

global/infoscroller.scr is:

Main:

thread infoscroller

end

infoscroller:
wait 30.0
iprintln "Welcome to...blah blah"
wait 1.0
iprintln "www.whatever.com"
wait 1.0
iprintln "IP: xxx.xxx.xxx.xxx"
wait 300.0
goto infoscroller

end

I pk3 it up, put it in mainta and it still repeats.

Posted: Sat May 24, 2003 7:05 am
by jv_map
Possibly the dm_precache script is called twice. Just set a variable when your script is running so that it won't start two instances.

Example:

Code: Select all

Main:

if(level.infoscroller != 1)
{
  level.infoscroller = 1
  thread infoscroller
}

end