"Invalid name: same as a command" when declaring list

Just starting out? Need help? Post your questions and find answers here.
ricardo_sdl
Enthusiast
Enthusiast
Posts: 141
Joined: Sat Sep 21, 2019 4:24 pm

"Invalid name: same as a command" when declaring list

Post by ricardo_sdl »

This code:

Code: Select all

NewList *Left()
Gives this error message:
Invalid name: same as a command (from library 'String').

I'm declaring a list of pointers, so it shouldn't be an error maybe?

Thanks!
You can check my games at:
https://ricardo-sdl.itch.io/
User avatar
mk-soft
Always Here
Always Here
Posts: 6320
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: "Invalid name: same as a command" when declaring list

Post by mk-soft »

This has always been the case and prevents spelling mistakes
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
ricardo_sdl
Enthusiast
Enthusiast
Posts: 141
Joined: Sat Sep 21, 2019 4:24 pm

Re: "Invalid name: same as a command" when declaring list

Post by ricardo_sdl »

I can see this is the case here:

Code: Select all

NewList Left()
Acessing the current element in Left() is the same as calling Left() without parameters. The error message could be clear if it had the command name that is ambiguous, like this:
Invalid name: Left() same as a command Left (from library 'String').
You can check my games at:
https://ricardo-sdl.itch.io/
Post Reply