Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Object Number Illegal - Need help quickly with this please

Author
Message
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 24th Nov 2007 01:13 Edited at: 24th Nov 2007 01:19
Hi, I have yet another problem guys, I don't like troubling you with them but I'm quite involved in a big project now and this is stopping it from compiling completely, and I don't want to revert to my temporary method since this needs to be finished.

Problem - I'm getting an object number illegal at line xxx message. I've had this before and have got around it, but the answer to this seems hard to spot, or I'm just tired, probably the latter.

Here's the code that involves the variable. I've deleted most of the useless parts.



Note - I decrease the CarAvailable variable by 200 in another function to get the variable needed to retrieve the variable from the array.

External Script -



Note 1 - Car(C).Number is 201 and that number is not being used for any other objects
Note 2 - I'm not using a float value for it in any case.

Thanks a lot to anyone that can help. If you need anymore information then just ask, as I said before, I need this solved ASAP.



revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 24th Nov 2007 04:45
is CarAvailable a global variable? otherwise you need to pass it to the function.
HeavyAmp
18
Years of Service
User Offline
Joined: 25th Oct 2006
Location: Castle in the Sky!
Posted: 24th Nov 2007 09:11
Its probably your CarAvailable variable try this(no guarantee it will work) . Also Same question as revenant chaos, you should really pass CarAvailable into the function



Better to be dead, than to live your life afraid.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 24th Nov 2007 16:31
Quote: "and this is stopping it from compiling completely"


If it won't compile, then curCar.number doesn't exist. Everything else in that line will compile.

vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 24th Nov 2007 19:32
It's ok guys, it's sorted now, I don't exactly know what the solution was though.

Thanks anyway



da power pwnerer
18
Years of Service
User Offline
Joined: 28th Jul 2006
Location: Pittsburgh, PA
Posted: 24th Nov 2007 22:05
I think I know. You used an Integer instead of a Float
Integers never work for objects on my pc.



-Dan


http://Freewebs.com/noobisoft
Come to Noobisoft's website today!
vorconan
18
Years of Service
User Offline
Joined: 4th Nov 2006
Location: Wales
Posted: 25th Nov 2007 00:38
Quote: "You used an Integer instead of a Float"


No, my computer uses integers for object numbers, I don't know how yours uses floats only.



Login to post a reply

Server time is: 2024-11-25 09:38:41
Your offset time is: 2024-11-25 09:38:41