Page 1 of 2
problems with a script
Posted: Tue Oct 07, 2003 10:43 pm
by El serg
well this script is a message scrpit when the yellow text is on the left of the screen for moh:SH. and when i put the stuff in it will not work. here is the script
Code: Select all
main:
setcvar "announce" "1"
setcvar "g_message1" "Modded Weapons And Names"
setcvar "g_message2" "Bazookas are Renamed And The Axis Rocket"
level waittill spawn
_message:
while (1)
{
local.message = getcvar "WELLCOME"
wait 5
if (local.message=="1")
{
wait 2
iprintln ("Welcome to " + getcvar "89th Clan Server") \n ("?|?|89TH:-?erg|?|?: " + getcvar "")
wait 30
iprintln (getcvar "Modded weapons") \n (getcvar "Thanks To CrazySniper")
}
else
{
}
wait 120
}
end
Posted: Wed Oct 08, 2003 7:14 am
by jv_map
Why all those getcvars
Anyway welcome to .map

Posted: Wed Oct 08, 2003 10:15 am
by Bjarne BZR
I made a remake of your script:
Code: Select all
main:
// These 3 cvars are never used
setcvar "announce" "1"
setcvar "g_message1" "Modded Weapons And Names"
setcvar "g_message2" "Bazookas are Renamed And The Axis Rocket"
level waittill spawn
thread message
end
message:
while (1)
{
// U sure its "WELLCOME", and not "WELCOME"?
// local.message = getcvar "WELLCOME"
local.message = "1" // Hard coded for testing
wait 5
if (local.message == "1") // Failure point. If cvar above is not exactly "1", you'll get squat.
{
wait 2
// This line looks strange... are U sure you know what you are doing?
// iprintln ("Welcome to " + getcvar "89th Clan Server") \n ("?|?|89TH:-?erg|?|?: " + getcvar "")
iprintln "Welcome to 89th Clan Server"
iprintln "?|?|89TH:-?erg|?|?: I'm so cool"
wait 30
// This line looks strange as well...
// iprintln (getcvar "Modded weapons") \n (getcvar "Thanks To CrazySniper")
iprintln "Modded weapons Thanks To CrazySniper"
} else {
// Nothing here... you can remove the else part if it does nothing :)
}
wait 120
}
end
As you havent really described what you are trying to do, I'm just guessing. So if this does not help you: describe what you want it to work like...
Posted: Wed Oct 08, 2003 8:35 pm
by The Jackal
Welcome to .MAP Serg - My DSL is down

I am on dialup with a 28K download.
Anyway that script is really messed up. It does not make alot of sense the way you changed it.
I suggest you look at my original script file and study it alittle. If you have any questions, post us here.
Welcome to scripting man. Its alot of fun and stress.

Posted: Wed Oct 08, 2003 9:12 pm
by El serg
man im soo cunfused okay this is what i want the script to say exatly:
__________________________________________________
?|Welcome To 89th Clan Server|?
Most Of The Weapons Modded And ReNamed
Admin Is ?|?|89?h:-?erg|?|?
Thank Crazysniper For Most Mods
Clan site 89th-clan.vze.com
__________________________________________________
okay i really a n00b at scrpiting lol and thanks for welcomeing me
so any ways i hope yal can help jackal tryed by i cant understand
scripting looks hard

Posted: Thu Oct 09, 2003 12:35 am
by The Jackal
Dude learning to walk was hard. Apply the same principal to scripting. Practice and read alot. Go through the original Pak3 files that came with the game. See how stuff is done and where files are stored. This forum is a great tool to use along with your practice and readings.
Regarding your script, just type something up like this.
Code: Select all
main:
setcvar "g_announce" "1"
setcvar "g_obj_alliedtext2" "============"
setcvar "g_obj_alliedtext3" "Weapons are modified"
setcvar "g_obj_axistext2" "Play By Server Rules"
setcvar "g_obj_axistext3" "============"
level waittill spawn
_mymessage:
while (1)
{
if (getcvar (g_announce)=="1")
{
thread mytext
}
wait 120
}
end
mytext:
wait 5
iprintln "?|Welcome To 89th Clan Server|?" \n iprintln ("ADMIN: " + getcvar "name")
wait 3
iprintln "Visit clan site at 89th-clan.vze.com"
wait 5
iprintln "Most mods by CrazySniper"
end
Posted: Thu Oct 09, 2003 6:32 am
by El serg
okay thanks ill gt used to it and the scptirt worked but a thing says this
iprintinADMIN just look at the link
http://www.geocities.com/sergio_p2003/index.html For admin out this if u can ?|?|89?H:-?erg|?|? and that it i think [oooohhh yeah My bithday waz the 8 of qct. i got a ATi video card woohoo]
Posted: Thu Oct 09, 2003 9:56 am
by bdbodger
Come on do a bit of guessing and experimenting on your own it is a good way to learn .
iprintln prints what is after the command to the screen
iprintln "Visit clan site at 89th-clan.vze.com"
gee what do you think this will do ? Maybe print Visit clan site at 89th-clan.vze.com on the screen ? Are we getting warmer yet ?
iprintln "?|Welcome To 89th Clan Server|?" \n iprintln ("ADMIN: " + getcvar "name")
I don't know where the \n came from but get rid of it and put what is after it on a different line or should I say change what is after it . Warmer !
Posted: Thu Oct 09, 2003 11:57 am
by jv_map
The \n may be used for a line break, but only in this manner:
iprintln "my line1\nmy line 2"
Posted: Thu Oct 09, 2003 12:26 pm
by bdbodger
hmm looks like I had a probem with the edit feature wonder why. How do you delete your own posts ?
Posted: Thu Oct 09, 2003 1:53 pm
by jv_map
Press this button

or edit and then check 'delete post'.
Posted: Thu Oct 09, 2003 2:23 pm
by The Jackal
Serg that prob was caused because I inadvertently left an iprintln command in the said line. You can fix it by deleting the second IPRINTLN that appears in that line. It should look like this:
Code: Select all
iprintln "?|Welcome To 89th Clan Server|?" \n ("ADMIN: " + getcvar "name")
That will correct it.
PS: Happy belated bird-day.

Posted: Thu Oct 09, 2003 8:21 pm
by El serg
ooohhh okay thanks jackal i try it
Posted: Fri Oct 10, 2003 12:36 am
by bdbodger
You can't seem to delete a post after someone has replied .
Posted: Fri Oct 10, 2003 12:51 am
by El serg
HUh