No number Names?

Forum Home Forum Home > Construct 2 General > Construct 2 general
 Post Reply Post Reply
Author
5,830 Rep
Post Options Post Options   Quote Schoening Quote  Post ReplyReply Direct Link To This Post Topic: No number Names?
    Posted: 23 Apr 2012 at 7:38pm
Hey i am wondering why i can't call Objects and Variables numbers?

Example: I can call a Sprite 001a but not simply 001.

And Variables can't be called numbers at all...

Why is that?


Was thinking of working on a -Save -Load mechanism similar to WC3 Orpg Maps.


Link
Back to Top
3,012 Rep
Post Options Post Options   Quote aridale Quote  Post ReplyReply Direct Link To This Post Posted: 23 Apr 2012 at 7:50pm
because numbers are viewed differently by the computer when accessing things. Its always been bad programming to use numbers at the beginning of names if at all.
Back to Top
19,339 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 24 Apr 2012 at 12:00am
set X to 001 * 1

Am I referring to the variable or the number? Who knows...
Back to Top

Scirra Developer
29,298 Rep
Post Options Post Options   Quote Tom Quote  Post ReplyReply Direct Link To This Post Posted: 24 Apr 2012 at 12:13am
Sqiddster's correct :) It's to remove ambiguity. Naming something as a number is also probably bad practise as it's not very descriptive
Back to Top

Scirra Developer
81,084 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 24 Apr 2012 at 6:04pm
This is the same as any scripting or programming language you'll ever use. Names cannot be numbers - if you name an object "1", how does the parser understand 1 + 1? :P
Back to Top
5,830 Rep
Post Options Post Options   Quote Schoening Quote  Post ReplyReply Direct Link To This Post Posted: 24 Apr 2012 at 9:30pm
@Ashley

Yeah that was my only problem with the idea 2 ^^

But i figured.. you knoooow.. Wing it xD


Thx for replies ^^

It doesn't matter at the moment anyway, I have all hands full learning Blender at the Moment :)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down