Setcvar.

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Darklord328
Posts: 74
Joined: Mon Sep 17, 2012 6:11 pm
Preferred Pronouns: He/Him

Setcvar.

Post by Darklord328 »

im making a mod of my own that i need help on, i just dont know if this is a bug or what. i am trying to do SetCvar, and thats giving me this error...

https://gyazo.com/a3bfd652c8602a601dca9bf84347d374

I just don't know what to do... from this point if any can help its much appreciated..

Thank You.

i also do not know what functions do. i have no ability on this. so if this is a function kinda script, then i do not know.
User avatar
m8f
 
 
Posts: 1449
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)

Re: Setcvar.

Post by m8f »

Do you have

Code: Select all

#include "zcommon.acs"
at the beginning of your ACS source code file?
Darklord328
Posts: 74
Joined: Mon Sep 17, 2012 6:11 pm
Preferred Pronouns: He/Him

Re: Setcvar.

Post by Darklord328 »

aight this is a simple script with a server int.

Code: Select all

script "Hellsgate22" (void)
{
  while (true)
  {
    If (GetCVar("Hellsgatelimit") > 100) // Maximum of monsters.
      SetCvar("Hellsgatelimit",100); // Maximum of monsters.
    If (GetCvar("Hellsgatelimit") < 1) // Minimal of monsters
      SetCvar("Hellsgatelimit",1); // Minimal of monsters
	Delay (60);
  }
}

script "Hellsgatenumberlimit" (void)
{
    SetResultValue(GetCVar("Hellsgatelimit"));
}
this is the setup for the script it does in zdoom when its in the script.

https://gyazo.com/a027f294e08852f17657a34fd03496ef theres the url.

setcvar does highlight, when compiling it just gives a script error. i'll send you the x10.wad file.

with the cvar.

https://www.sendspace.com/file/ei5vdn

im hoping this has the information that you need.


i hope that this clears it. :wink:

this also does callacs.

Return to “Scripting”