P_Startscript Unknown Script

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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.

P_Startscript Unknown Script

Postby XASSASSINX » Mon Jan 07, 2019 6:13 pm

Hello everyone, I'm trying to run a script that if On, it spawns a baron of hell on a custom zombieman. (This is just a test, First time using custom Cvras and menu options). Hovewer, When i use A_JumpIf(CallACS), I get this error:

"P_StartScript: Unknown Script "Cl_Mancubus".

I have the whole menu On and Off defined. Why do i get that? It's just a simple option that jumps to the state if it's on then spawn a baron of hell. Here's the script:

Code: Select allExpand view
  Spawn:
 TNT1 A 0
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 0 A_JumpIf(CallACS("Cl_Mancubus") == 1, "SpawnRegular")
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImp", 2,  25, 10)
 Goto SpawnRegular


Any help??
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby TDRR » Mon Jan 07, 2019 10:28 pm

XASSASSINX wrote:Hello everyone, I'm trying to run a script that if On, it spawns a baron of hell on a custom zombieman. (This is just a test, First time using custom Cvras and menu options). Hovewer, When i use A_JumpIf(CallACS), I get this error:

"P_StartScript: Unknown Script "Cl_Mancubus".

I have the whole menu On and Off defined. Why do i get that? It's just a simple option that jumps to the state if it's on then spawn a baron of hell. Here's the script:

Code: Select allExpand view
  Spawn:
 TNT1 A 0
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 0 A_JumpIf(CallACS("Cl_Mancubus") == 1, "SpawnRegular")
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImp", 2,  25, 10)
 Goto SpawnRegular


Any help??


The script name in the ACS source has to be named inbetween quotes, you also need to use #library "insertthenameofthisfile" and create a file named LOADACS having the name of your ACS file. This is called using an ACS library, but real macho men call it Global ACS.
User avatar
TDRR
putting jelly on this hot dog
 
Joined: 11 Mar 2018
Location: The present

Re: P_Startscript Unknown Script

Postby XASSASSINX » Tue Jan 08, 2019 9:40 am

Yeeahhh... Problem is, It's not really a script. It's just a Cvar. I'm studying colorfullhell custom options menu and trying to make my own. First time using it. The script is just a Cvar, not really a

Script 1 open blabla stuff, But still, does that count as script?
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby wildweasel » Tue Jan 08, 2019 10:21 am

What does your ACS source look like?
User avatar
wildweasel
「お前はもうトースト」[you are already toast.]
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: P_Startscript Unknown Script

Postby TDRR » Tue Jan 08, 2019 12:31 pm

Then just use GetCvar instead of CallACS.

The ACS method is only useful if you are going for Zandronum support, otherwise just use GetCvar which is slightly faster than ACS.
User avatar
TDRR
putting jelly on this hot dog
 
Joined: 11 Mar 2018
Location: The present

Re: P_Startscript Unknown Script

Postby XASSASSINX » Tue Jan 08, 2019 5:09 pm

YESSS! That's exactly what i was looking for. "A_JumpIfCvar". I was looking for something like that, but i couldn't find it anywhere. Thanks man!
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby XASSASSINX » Tue Jan 08, 2019 5:13 pm

No... Wait what?? Is something wrong with the A_SpawnItemEx? Why it still not spawning?

Code: Select allExpand view
  Spawn:
 TNT1 A 0
 Goto CheckSurprise
  CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")
 Goto Surprise
  SpawnRegular:
 POSS AB 10 A_Look
 Loop
 Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular


So... Yeah, I'm trying to use like this:

Code: Select allExpand view
TNT1 A 0 GetCvar("Ml_mancubus")


Now it goes to Death state (Which i put to on). How do i make it so it does not go there?

Code: Select allExpand view
TNT1 A 3 GetCvar("Ml_Mancubus")
 Goto Death
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby TDRR » Thu Jan 10, 2019 12:46 pm

"GetCvar("Ml_mancubus")" Won't work. It HAS to be A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")

Also this doesn't make much sense, what does each state do? I can't see any sense in this code.
User avatar
TDRR
putting jelly on this hot dog
 
Joined: 11 Mar 2018
Location: The present

Re: P_Startscript Unknown Script

Postby XASSASSINX » Thu Jan 10, 2019 1:57 pm

Okay. Let me break into pieces.

Code: Select allExpand view
Spawn:
 TNT1 A 0
 Goto CheckSurprise


When he spawn, he immediatlys goes to the state that checks the "Surprise" (Spawning imp or no.)

Code: Select allExpand view
CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")
 Goto Surprise

This state checks the Cvar. If it's on 0, it puts the regular Zombieman spawn state, Otherwise, it goes to the Imp spawning state.
Code: Select allExpand view
SpawnRegular:
 POSS AB 10 A_Look
 Loop

A Crtl+c and Crlt+v of the Zombieman spawn state. Nothing else.

Code: Select allExpand view
Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular


Now THIS is the state that he spawns the Imp. Or at least he's supposed to. Nothing happens, as if he just goes to the regular Spawn state without checking the Cvar.
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby TDRR » Thu Jan 10, 2019 6:56 pm

XASSASSINX wrote:Okay. Let me break into pieces.

Code: Select allExpand view
Spawn:
 TNT1 A 0
 Goto CheckSurprise


When he spawn, he immediatlys goes to the state that checks the "Surprise" (Spawning imp or no.)

Code: Select allExpand view
CheckSurprise:
TNT1 A 3 A_JumpIf(GetCvar("Cl_Mancubus") == 0, "SpawnRegular")
 Goto Surprise

This state checks the Cvar. If it's on 0, it puts the regular Zombieman spawn state, Otherwise, it goes to the Imp spawning state.
Code: Select allExpand view
SpawnRegular:
 POSS AB 10 A_Look
 Loop

A Crtl+c and Crlt+v of the Zombieman spawn state. Nothing else.

Code: Select allExpand view
Surprise:
 POSS A 4 A_SpawnItemEx("DoomImpNewAi")
 Goto SpawnRegular


Now THIS is the state that he spawns the Imp. Or at least he's supposed to. Nothing happens, as if he just goes to the regular Spawn state without checking the Cvar.


Do you have this CVAR defined in CVARINFO?
User avatar
TDRR
putting jelly on this hot dog
 
Joined: 11 Mar 2018
Location: The present

Re: P_Startscript Unknown Script

Postby XASSASSINX » Mon Jan 14, 2019 5:52 pm

Yeah, here it is:

Code: Select allExpand view
user int cl_Mancubus = 1;
XASSASSINX
 
Joined: 20 Dec 2016
Location: MURICAA BROTHER! Just kidding, Brazil.

Re: P_Startscript Unknown Script

Postby TDRR » Mon Jan 14, 2019 9:13 pm

My only advice would be:

In CVARINFO, you should define the cvar as a bool, and replace 1 by "TRUE"
Invert the rules for the toggle: Have it check if cl_mancubus is on 1 and go to surprise if that's the case, if not, go to spawnregular.

If not then you may need to send me the PK3 so i can further investigate the problem, right now there's nothing outright visible that would make it not work.
User avatar
TDRR
putting jelly on this hot dog
 
Joined: 11 Mar 2018
Location: The present


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest