Offset doesn't seem to accept functions

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Offset doesn't seem to accept functions

Post by DoomRater »

Produced in QZDoom version q2.0.0 (0473991c23da087669f9fcc591fd4fbdd89b1f3b).

I was looking to use Random() in an Offset parameter to make a weapon appear jittery when fired, but not always have the same pattern, but I received an error when trying just that saying it's a bad constant. Then it crashed.

Code: Select all

Script error, "9mm infinite.zip:ld_9mm.wad:DECORATE" line 51:
SC_GetNumber: Bad numeric constant "random".

Code: Select all

	  GLCK DDD 1 Offset(random(0,3), random(32,36))
And because a file is requested: https://www.dropbox.com/s/6c6m33p6lo8bw ... t.zip?dl=0
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49066
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Offset doesn't seem to accept functions

Post by Graf Zahl »

The offsets are constants, this is entirely expected.
User avatar
Mikk-
Posts: 2274
Joined: Tue Jun 30, 2009 1:31 pm
Location: Somewhere off Kanagawa

Re: Offset doesn't seem to accept functions

Post by Mikk- »

[wiki]A_WeaponOffset[/wiki]
User avatar
DoomRater
Posts: 8265
Joined: Wed Jul 28, 2004 8:21 am
Preferred Pronouns: He/Him
Location: WATR HQ
Contact:

Re: Offset doesn't seem to accept functions

Post by DoomRater »

What about the crash afterwards though? I got an error from the console, but then it crashed with an Access Violation.
Post Reply

Return to “Closed Bugs [GZDoom]”