ID:1380015
 
Resolved
Attempting to access the atom.transform, color, and alpha vars in a project compiled in 500, but not using those vars in the code, caused a runtime error. This happened when trying to access them via the atom.vars list.
BYOND Version:500.1209
Operating System:Windows 8 Pro 64-bit
Web Browser:Firefox 23.0
Applies to:Dream Daemon
Status: Resolved (500.1210)

This issue has been resolved.
Descriptive Problem Summary:
When using edit on an item the transform variable halts the process by returning;
runtime error: undefined variable /mob/Player/var/transform
proc name: Edit (/mob/GM/LVL3/verb/Edit)
source file: Level_3.dm,301
usr: Iratu (/mob/Player)
src: Iratu (/mob/Player)
call stack:
Iratu (/mob/Player): Edit(Iratu (/mob/Player))

It does the same for the alpha and color var.

I haven't used these variables anywhere in the coding yet.

Numbered Steps to Reproduce Problem:
Right click something and click Edit and there is the error message.


Code Snippet (if applicable) to Reproduce Problem:
http://pastebin.com/tfXEw1W0
Did it in a pastebin since its a lot of lines.

Expected Results:

Edit window to popup.

Actual Results:

Results in errors

Does the problem occur:
Every time? Or how often? Everytime
In other games? Cannot check.
In other user accounts? Yes.
On other computers? Yes.

When does the problem NOT occur?
Having the verb skip those 3 variables.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)

It did not show the error and worked perfectly fine in BYOND 4.x
Workarounds:
Include

                        variables -= "transform"
variables -= "alpha"
variables -= "color"

Assuming the library is getting its info from the atom's vars list, then those vars should be accessible, IF the game has been compiled for version 500 or higher. If it hasn't, then those vars don't exist. Are you perhaps trying to edit a 500 var on a non-500 .dmb?

I checked the code, and it looks like these should definitely be in the vars list for an up-to-date .dmb, but anything compiled in an older version won't have them.
I have compiled it in Version 500.1209 I have even tried deleting both the DMB + rsc still got that error. On the pastebin its line 35.

html += "<td>[DetermineVarType(O.vars[X])]</td>"


[Edit]

It doesn't even open the Edit page. It stops when it tries to check the vars list.
Which library is this? I've been able to access the vars list fine and I'm not getting undefined var errors anywhere. I'd like to confirm with the library itself, or even a test project.
Lummox JR changed status to 'Unverified'
I've sent you a pager message with an Project
Lummox JR resolved issue with message:
Attempting to access the atom.transform, color, and alpha vars in a project compiled in 500, but not using those vars in the code, caused a runtime error. This happened when trying to access them via the atom.vars list.