|
|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
This is probably a dumb-sounding question, but I just don't know how to set variables to something so they stay set. I don't want them to go back to being 0 after the script is done.
Also, while I'm at it, is it possible to put a string value into a variable?
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
use: set %var instead of: var %var
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
/set %Variable Value /set %KewlioMZX Hello world. /help Variables. Those will stay set untill you /unset %Variable or what have you.
Last edited by SladeKraven; 07/08/03 02:17 AM.
|
|
|
|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
Yes, that's very nice, but I'm trying to set a variable within an alias script, and when the script ends, the variable returns to 0. Here it is:
/sm { if %selfmod = 0 echo 8 -a Self-moderation mode in effect | %selfmod = 1 elseif %selfmod = 1 echo 8 -a Self-moderation mode no longer in effect | %selfmod = 0 }
Naturally, this isn't the entire script, the rest would be within the Remote script section, but that's beside the current point.
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
Try this
alias sm {
if (%selfmod == 0) { echo 8 -a Self-moderation mode in effect | set %selfmod 1 }
elseif (%selfmod == 1) { echo 8 -a Self-moderation mode no longer in effect | set %selfmod 0 }
}
Your usage of the =='s operators was incorrect. Also missed out brackets.
Last edited by SladeKraven; 07/08/03 02:52 AM.
|
|
|
|
Joined: Aug 2003
Posts: 29
Ameglian cow
|
OP
Ameglian cow
Joined: Aug 2003
Posts: 29 |
Thank you That worked. I guess the problem is, I haven't learned C++ yet. Good thing I'm taking a course mostly based on it at college next year
Kewlio Insanity is all I have to keep from becoming insane.
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
You're welcome. I am taking a C++ course this year in college..
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
Im taking a C++ Course in Windows API this year in Reading >:D
Heh, had to do it--sry
-KingTomato
|
|
|
|
Joined: Dec 2002
Posts: 3,547
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,547 |
No biggie man, it's cool. Anyone else wanting to post what they're gonna take a course on this year? Heh, had to do it, sorry. :tongue:
|
|
|
|
Joined: Jul 2003
Posts: 742
Hoopy frood
|
Hoopy frood
Joined: Jul 2003
Posts: 742 |
im taking a double block all year corse on multimedia; movies images, and ect... in high school...
|
|
|
|
|
|