[Not a bug] Offset doesn't seem to accept functions

Bugs that have been investigated and resolved somehow.

Moderators: Developers, ZDoom.org Team

Offset doesn't seem to accept functions

Postby DoomRater » Thu Oct 19, 2017 2:08 pm

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 allExpand view
Script error, "9mm infinite.zip:ld_9mm.wad:DECORATE" line 51:
SC_GetNumber: Bad numeric constant "random".

Code: Select allExpand view
     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
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308

Re: Offset doesn't seem to accept functions

Postby Graf Zahl » Thu Oct 19, 2017 2:25 pm

The offsets are constants, this is entirely expected.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Offset doesn't seem to accept functions

Postby Mikk- » Thu Oct 19, 2017 2:26 pm

User avatar
Mikk-
blub blub blub
 
Joined: 30 Jun 2009
Location: Space station base of the UAC
Discord: Mikk0451#3922

Re: Offset doesn't seem to accept functions

Postby DoomRater » Thu Oct 19, 2017 2:31 pm

What about the crash afterwards though? I got an error from the console, but then it crashed with an Access Violation.
User avatar
DoomRater
Hi, I'm bob.
 
Joined: 28 Jul 2004
Location: WATR HQ
Discord: DoomRater#6308


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 1 guest