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.

DarkBASIC Professional Discussion / Need Help with Satchmo's Minecraft Example Source

Author
Message
DIGIROSS
19
Years of Service
User Offline
Joined: 15th Dec 2006
Location:
Posted: 3rd Apr 2012 13:48
I'm trying to learn from his minecraft example by dissecting the code but am having trouble compiling it in the first place, I get an error message. Note: I have sparky's and matrix utils installed already as he stated.

It is having problems with this, stating "Subscript must be Integer or DWORD when referencing an array at line 395:

instance object oc,types(int(terrain(int(object position x(obj)),int(object position z(obj)),int(object position y(obj))+1).otype)).onum

Any help would be appreciated, thanks.

Mess with the best, die like the rest!
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 3rd Apr 2012 19:03 Edited at: 3rd Apr 2012 19:06
Best guess is that the data type isn't setup properly or there's a typo in the names being used.

Try to break the statement down into smaller parts and see which part gives the error.

a = types(0).onum

a = terrain(0, 0, 0).otype

a = terrain(int(object position x(obj)),int(object position z(obj)),int(object position y(obj))+1).otype

Login to post a reply

Server time is: 2026-07-11 02:30:38
Your offset time is: 2026-07-11 02:30:38