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.

AppGameKit Classic Chat / [SOLVED] Type points to itself

Author
Message
TomToad
6
Years of Service
User Offline
Joined: 6th Jan 2018
Location:
Posted: 2nd May 2020 14:53
example code

I get main.agc:2: error: Type "tcell" cannot contain itself as a varaible So how can I have a type point to other instances of the same type?

The author of this post has marked a post as an answer.

Go to answer

hendron
8
Years of Service
User Offline
Joined: 20th Dec 2015
Location:
Posted: 2nd May 2020 15:25
This post has been marked by the post author as the answer.
Tier 1 has no support for pointers or references (with the exception of passing UDTs by reference to functions), so it's not possible for a UDT to contain a field of it's own type. One method you could use is to keep all of your TCell variables in an array and have north, east, south, and west point to indices in that array.

Login to post a reply

Server time is: 2024-11-22 05:27:30
Your offset time is: 2024-11-22 05:27:30