Compile Error: Function can not return a value
BlitzMax Forums/BlitzMax Beginners Area/Compile Error: Function can not return a value
| ||
And I don't understand what's missing. If I omit SuperStrict it compiles. This is my Method SuperStrict Type TClient Global list:TList = New TList Method New() list.AddLast(Self) End Method Method clientsCount() Return list.Count() End Method End Type |
| ||
When using SuperStrict ALL variables must have a type, even function results ;)Method clientsCount:Int() .... |
| ||
When using SuperStrict ALL variable must have a type, even function results ;) Yep, you need to specify the return type in the method SuperStrict Type TClient Global list:TList = New TList Method New() list.AddLast(Self) End Method Method clientsCount:Int() Return list.Count() End Method End Type |
| ||
oh yes, I thought I had tried this, funny, I guess I don't know anymore what I tried everything, must have been too late ;) or a maybe a reboot this morning helped, don't know, but it works now, thank you very much. |
| ||
I strongly suspect the suggested changes made the difference rather than a reboot. |
| ||
me too :) but sure I am not, sometimes the forces do go strange ways... |
| ||
Mysticism of the strange forces are fine for Windows, but not for programming ;) |
| ||
don't underestimate the dark force 8= |