'lil help please

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
PhattyB
Private
Posts: 6
Joined: Wed May 14, 2003 4:15 pm

'lil help please

Post 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?
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post 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


[VS-UK]Capt.Parts[BnHQ]
PhattyB
Private
Posts: 6
Joined: Wed May 14, 2003 4:15 pm

Post 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.
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 
Image
Post Reply