(Important bug) Dim variables in "with" statements [Fixed Patch 31.1]

Description: Report bugs of SMBX-38A here.
Forum rules: https://wohlsoft.ru/forum/viewtopic.php?f=64&t=1069
Moderators: Lx Xzit, Yoshi021, 5438A38A, Semi-moderatos, Moderators

Lx Xzit M
Topic author, Moderator
Moderator
Avatar
Lx Xzit M
Topic author, Moderator
Moderator
Reputation: 404
Posts: 753
Joined: 9 Nov 2015
Website

Post #1by Lx Xzit » 20 Sep 2020, 10:09

When you use a dim variable and then use a "with" block, accessing to this object's variables will result in "Access Violation" error.

For example:

Code: Select all

dim i as integer
with npc(1)
    .xsp = 1 'stops the script
end with


This bug breaks basically all my scripts.
By the way, it reminds me to the "struct" bug I reported that hasn't been fixed yet.
VISIT MY YOUTUBE CHANNEL! LX XZIT
Join our 38A Discord server!

Image

Void M
Bat
Bat
Avatar
Void M
Bat
Bat
Age: 19
Reputation: 91
Posts: 276
Joined: 18 Apr 2014
Location: [REDACTED]

Post #2by Void » 29 Nov 2020, 9:39

Lx Xzit wrote:When you use a dim variable and then use a "with" block, accessing to this object's variables will result in "Access Violation" error.

For example:

Code: Select all

dim i as integer
with npc(1)
    .xsp = 1 'stops the script
end with


This bug breaks basically all my scripts.
By the way, it reminds me to the "struct" bug I reported that hasn't been fixed yet.
I think this should be stickied and (hopefully) fixed ASAP. Most experienced scripters are actually using the dim variable ever since it's been discovered, so to see basically half of the scripts break in patch 31 is really upsetting to a lot of people, including myself. As a result I've been discouraging people from using patch 31.
Join the SMBX 38a Discord Server!
Image

sweep a leaf sweep away a troubles

OfficialJC02 M
Honourable citizen
Honourable citizen
Avatar
OfficialJC02 M
Honourable citizen
Honourable citizen
Age: 18
Reputation: 19
Posts: 47
Joined: 30 May 2020
Youtube channel URL

Post #3by OfficialJC02 » 23 Dec 2020, 14:41

Lx Xzit wrote:When you use a dim variable and then use a "with" block, accessing to this object's variables will result in "Access Violation" error.

For example:

Code: Select all

dim i as integer
with npc(1)
    .xsp = 1 'stops the script
end with


This bug breaks basically all my scripts.
By the way, it reminds me to the "struct" bug I reported that hasn't been fixed yet.

This has been fixed in patch 31.1, which just came out a few minutes ago.


Return to “Bug reports”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest