Error message regarding my ZSCRIPT cheats

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!)
User avatar
AshHouswares
Posts: 145
Joined: Fri Jun 03, 2022 11:31 am
Graphics Processor: Not Listed

Error message regarding my ZSCRIPT cheats

Post by AshHouswares »

I'm getting this on bootup. What does this mean? Too many arguments? In what way?

Code: Select all

  Family 6, Model 140, Stepping 1
  Features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2 AVX512 F16C FMA3 BMI1 BMI2 HyperThreading
V_Init: allocate screen.
ST_Init: Init startup screen.
Checking cmd-line parameters...
S_InitData: Load sound definitions.
G_ParseMapInfo: Load map definitions.
Texman.Init: Init texture manager.
ParseTeamInfo: Load team definitions.
LoadActors: Load actor definitions.
Script error, "HorryefieingCircleMansion.ipk3:zscript/cheatcodes" line 85:
Too many arguments in call to CheatItems
For the record, this is the script its referring too...

Code: Select all

		if (e.name == "EV_CheatGod")
		{
			if (!(pmo.player.cheats & CF_GODMODE))
			{
				Console.Printf("Prepare to live.");
				pmo.player.cheats |= CF_GODMODE;
			}
			else
			{
				Console.Printf("Prepare to die.");
				pmo.player.cheats &= ~CF_GODMODE;
			}
		}
		else if (e.name == "EV_CheatGiveStuff")
		{
			Console.Printf("Fine. Ruin the fun. See if I care.");
			pmo.CheatGive("all", 0);
		}
		else if (e.name == "EV_CheatKeys")
		    Console.Printf("Here's some keys.");
			pmo.CheatItems("");
	}
Jarewill
 
 
Posts: 1845
Joined: Sun Jul 21, 2019 8:54 am

Re: Error message regarding my ZSCRIPT cheats

Post by Jarewill »

Going by the error, you put too many arguments when you called the function CheatItems.
However I am not familiar with that function, if it's a custom one please post its full definition.
My only guess is to call the function without any arguments: pmo.CheatItems();

Return to “Scripting”