MantisBT - Zandronum
View Issue Details
0003473Zandronum[All Projects] Bugpublic2018-08-29 20:182018-09-11 14:11
Mr. Satan 
0003473: CheckClass ACS function is broken
Using the ACS function CheckClass in a script always return 0.
Download CheckClass test.pk3. Load it in Zandro. "Puke 999" in console window.
Still broken in Zandro 3.1
No tags attached.
? CheckClass test.pk3 (622) 2018-08-29 20:18
png Screenshot_Doom_20180910_163853.png (1,035,889) 2018-09-10 20:43
png Screenshot_Doom_20180910_164550.png (1,228,315) 2018-09-10 20:47
Issue History
2018-08-29 20:18Mr. SatanNew Issue
2018-08-29 20:18Mr. SatanFile Added: CheckClass test.pk3
2018-09-07 20:50KorshunNote Added: 0019495
2018-09-07 20:51KorshunNote Edited: 0019495bug_revision_view_page.php?bugnote_id=19495#r11770
2018-09-10 09:17Mr. SatanNote Added: 0019497
2018-09-10 11:07IvanNote Added: 0019498
2018-09-10 20:43Mr. SatanFile Added: Screenshot_Doom_20180910_163853.png
2018-09-10 20:47Mr. SatanFile Added: Screenshot_Doom_20180910_164550.png
2018-09-10 20:54Mr. SatanNote Added: 0019501
2018-09-10 21:57Edward-sanNote Added: 0019503
2018-09-10 21:59Edward-sanNote Edited: 0019503bug_revision_view_page.php?bugnote_id=19503#r11777
2018-09-10 22:00Edward-sanNote Edited: 0019503bug_revision_view_page.php?bugnote_id=19503#r11778
2018-09-11 14:11KorshunNote Added: 0019504

2018-09-07 20:50   
(edited on: 2018-09-07 20:51)
You are trying to use CheckClass where you should have used CheckInventory

Mr. Satan   
2018-09-10 09:17   
In Zdoom/GZDoom it returns 1. According to the wiki, this function should return 1 if the Class is valid/exists, 0 if it doesn't. It doesn't use a TID to check a specific player/thing. [^]
2018-09-10 11:07   
Uhh you realize that still isn't the intended use for the CheckClass function right? CheckClass compares the class of the activator vs. what is given as input... None of them can be the player as they are inventory items... Add "CheckClass("PlayerPawn")" in there and it should show you 1.
Mr. Satan   
2018-09-10 20:54   
Check out the two screencaps one is from Zandro and the other one is from GZDoom. GZDoom returns 1 if the class exists. Zandro returns 0 for all even PlayerPawn. If CheckClass simply compared the activator's class to the the inputted class it would be the same as CheckActorClass using 0 as the TID.
2018-09-10 21:57   
(edited on: 2018-09-10 22:00)
Of course it'll always print 0. CheckClass isn't implemented in Zandronum 3.0 at all, anyway.

2018-09-11 14:11   
I am sorry for my misleading comments. ZDoom documentation is confusing. You are using CheckClass the right way, but it's not implemented in GZDoom 1.8.6, on which Zandronum 3.1 is based. Unimplemented ACS functions always return 0.