Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001626Zandronum[All Projects] Suggestionpublic2013-12-30 00:302018-09-30 22:28
ReporterVisual Vincent 
Assigned ToTorr Samaho 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version1.2 
Target Version3.0Fixed in Version3.0 
Summary0001626: Backport ZDoom's Named Scripts and make the number of scripts exceed 999.
DescriptionPlease backport ZDoom's named scripts and make the script numbers able to exceed 999. This would be very useful to prevent mods from overriding each others scripts.
Attached Files

- Relationships
child of 0002172closedTorr Samaho Upgrade GZDoom base to 1.8.6 

-  Notes
User avatar (0007803)
ZzZombo (reporter)
2013-12-31 18:22

Named scripts of special types are already supported though. That means you can't execute them manually (unless you know their number, then yeah).
User avatar (0007804)
Visual Vincent (reporter)
2013-12-31 18:58

I meant the ACS scripting.
Like:

Script 1 OPEN
{
ACS_NamedExecute("I am a script", 0, 0, 0, 0);
}

Script "I am a script" (void)
{
Print(s:"Hi :D");
}
User avatar (0007805)
Visual Vincent (reporter)
2013-12-31 19:00

When i try to make a named script it only gives me an error.
User avatar (0012050)
ZzZombo (reporter)
2015-04-05 14:38

Vincent, this works, as I've already stated:
script "TEST" ENTER
{
    Print(s:"It works!");
}
User avatar (0012066)
Visual Vincent (reporter)
2015-04-06 21:30
edited on: 2015-04-06 21:33

ZzZombo:
ENTER != (void)


Named scripts as ENTER or OPEN worked in Zan 1.3, but since it's converted into a number, and script numbers won't exceed 999 it doesn't work in Zan 2.0

User avatar (0012068)
Arctangent (reporter)
2015-04-06 22:04

These two requests are entirely different things, I think,

I'm pretty sure ZDoom's named scripts use negative numbers, not over-999 numbers. Trying to use an over-999 script in ZDoom will give you the exact sae error, iirc.
User avatar (0012070)
Visual Vincent (reporter)
2015-04-07 09:30
edited on: 2015-04-07 09:31

Arctangent:
Yes, I've heard before that ZDoom uses negative numbers...
But that's probably also converted in some way. Because the error I get is this:
Error: Script number 65535 exceeds 999!


User avatar (0012071)
Arctangent (reporter)
2015-04-08 02:21

I'm pretty sure the bytecode for named scripts don't actually have a number assigned, but rather when everything is loaded the scripts are given negative numbers to make sure that the engine has a way to refer to them. If they were given numbers when the code is compiled, you'd still run into number conflicts, just it'd be a lot less obvious when that happens because you'd only know the scripts by their names, not numbers.

So, I'm thinking this is more of an error in Zandronum's assigning of numbers upon loading.
User avatar (0012072)
Dusk (developer)
2015-04-08 09:26

Let me clear a few things up:
- Zandronum has never, ever supported named scripts! They only happened to """work""" because of lack of safeguard code. Zandronum 2.0 fixed this behavior by giving an error message instead of undefined behavior. "Named scripts" in 1.3 caused random crashes and who knows whatever else.
- I figure the named script number is converted to unsigned somewhere as part of the error message for the same reason. Negative script numbers don't exist in Zandronum anyway so I guess there's got to be an unsigned integer somewhere in the pipeline.
- Named scripts were added in ZDoom 2.6 and will be ported as part of the scheduled ZDoom upgrade for Zandronum 3.0.

Now, please cut the FUD as if named scripts ever worked in Zandronum.
User avatar (0012251)
Hypnotoad (reporter)
2015-05-11 21:30

Testing named scripts in 3.0, named scripts execute successfully, and I tested ACS_NamedExecute, which works fine too.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Hypnotoad Combinebobnt Fused DevilHunter
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2013-12-30 00:30 Visual Vincent New Issue
2013-12-30 12:33 Dusk Status new => acknowledged
2013-12-30 12:33 Dusk Resolution open => backport later
2013-12-31 18:22 ZzZombo Note Added: 0007803
2013-12-31 18:58 Visual Vincent Note Added: 0007804
2013-12-31 19:00 Visual Vincent Note Added: 0007805
2015-04-04 21:21 Arco Relationship added child of 0002172
2015-04-05 08:16 WaTaKiD Target Version => 3.0
2015-04-05 14:38 ZzZombo Note Added: 0012050
2015-04-06 21:30 Visual Vincent Note Added: 0012066
2015-04-06 21:31 Visual Vincent Note Edited: 0012066 View Revisions
2015-04-06 21:31 Visual Vincent Note Edited: 0012066 View Revisions
2015-04-06 21:33 Visual Vincent Note Edited: 0012066 View Revisions
2015-04-06 22:04 Arctangent Note Added: 0012068
2015-04-07 09:30 Visual Vincent Note Added: 0012070
2015-04-07 09:31 Visual Vincent Note Edited: 0012070 View Revisions
2015-04-08 02:21 Arctangent Note Added: 0012071
2015-04-08 09:26 Dusk Note Added: 0012072
2015-05-09 13:56 Dusk Status acknowledged => assigned
2015-05-09 13:56 Dusk Assigned To => Torr Samaho
2015-05-09 13:58 Dusk Status assigned => needs testing
2015-05-11 21:30 Hypnotoad Note Added: 0012251
2015-05-11 21:35 WaTaKiD Status needs testing => resolved
2015-05-11 21:35 WaTaKiD Resolution backport later => fixed
2015-05-11 21:35 WaTaKiD Fixed in Version => 3.0
2018-09-30 22:28 Blzut3 Status resolved => closed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker