armory3d / armortools

3D Content Creation Tools
https://armorpaint.org
Other
3.29k stars 336 forks source link

Identifier "x" is undefined #1660

Closed vitormaduro closed 11 months ago

vitormaduro commented 11 months ago

ArmorPaint version: Commit 512e558

OS/device including version: OS: Windows 10 GPU: AMD Radeon RX 6700 - Driver version 22.Q4

Issue description: I was following the tutorial available at the ArmorPaint's ReadMe, and everything seemed normal until I reached the Build step. No matter what I did, the main.cpp file of the project had 2 errors that were preventing the build from finishing: E0020 - identifier "x" is undefined and E0020 - identifier "y" is undefined, both present on line 351.

image

I deleted everything tried again from the start a few more times, but no luck. Please note that I had changed the Build Configuration to "Release" and the Platform to "x64" already.

Eventually I decided to investigate the code itself, and changed line 351, from:

if (x < -1 && y < -1) {

To:

if (win.x < -1 && win.y < -1) {

This seemed to fix the warnings, and the build finally finished. I was then able to follow the tutorial to the end and run ArmorPaint normally.

Steps to reproduce: Follow the Windows instructions shown at https://github.com/armory3d/armortools/tree/main/armorpaint. The # Build and run for x64 & release step will fail and the build will not finish.

luboslenco commented 11 months ago

:+1: fixed, thanks for report