Script warning for bad hex number?

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!)
Post Reply
Guest

Script warning for bad hex number?

Post by Guest »

I'm making a mod with unlimited duration powerup, using example from the wiki (https://zdoom.org/wiki/Actor_properties ... p.Duration) but upon loading I get in console a warning "Script warning... Bad Hex Number: No." Why is this, what does it mean? I use GZDoom 3.2.5 for this.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Script warning for bad hex number?

Post by Graf Zahl »

There must be something incorrect in the line that got reported. Since you conveniently left out all the relevant info and did not post the script causing the message, I cannot tell you more.
Guest

Re: Script warning for bad hex number?

Post by Guest »

It's in DECORATE, a powerup with "Powerup.Duration 0x7FFFFFFD" just like the wiki.

That is how it appears in the actor, that is what is causing the warning.
User avatar
Rachael
Posts: 13530
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Script warning for bad hex number?

Post by Rachael »

Did you copy-paste that or did you type that out? Remember to use 6 F's.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Script warning for bad hex number?

Post by Graf Zahl »

That should never run through the hex parser if really written like that. If you want help, please post the entire definition. From fragments this cannot be checked because they lack the needed context.
Guest

Re: Script warning for bad hex number?

Post by Guest »

The wiki literally says "0x7FFFFFFD", exactly. Did you even look at it? You could use this in any actor and it would say the same thing in the console. So either the wiki is wrong or there's something missing.

Code: Select all

ACTOR InfiniteSuit : PowerupGiver
{
   Powerup.Type "IronFeet"
   Powerup.Duration 0x7FFFFFFD
}
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Script warning for bad hex number?

Post by Graf Zahl »

I can launch that sample code without problems using a recent devbuild and with 3.0.0. Are you sure that this is the cause of your error? We cannot tell because you still haven't posted the complete error message
Post Reply

Return to “Scripting”