[Solved] What's wrong with this NG Type?
BlitzMax Forums/BlitzMax NG/[Solved] What's wrong with this NG Type?
| ||
One of my type needs to create a type inside it and I'm getting a Node to Int unable to convert errorType Node Field up Field down Field X:Int Field Y:Int Method Create:Node(x:Int,y:Int) Local n:Node = New Node n.X=x n.Y=y Return n End Method Method Draw(x:Int,y:Int) up = New Node.Create(x,y) End Method End Type |
| ||
Type Node Field up:Node ' <----- here Field down Field X:Int Field Y:Int Method Create:Node(x:Int,y:Int) Local n:Node = New Node n.X=x n.Y=y Return n End Method Method Draw(x:Int,y:Int) up = New Node.Create(x,y) End Method End Type |
| ||
thanks Dave, sometimes I'm really forgetting those details. works ok now! |
| ||
SuperStrict really helps here :-) |
| ||
Yes I know Derron, but in my case here I'm doing a conversion from Monkey and I can't deal with superstrict checking atm. Maybe I'll try this next time :) |
| ||
I can't deal with superstrict checking atm. But you shouldn't bother others with issues then, which would "cure on its own", when done with SuperStrict ;-) Lazyness now is just delaying the workload for a later moment. Just do now properly and save time later on. Another benefit is: you now have higher chances to already find bugs because of wrong data types (field b:byte = integervalue). bye Ron |
| ||
Lazyness now is just delaying the workload for a later moment. Just do now properly and save time later on. Problem with that is, that's not my work to begin with and it's from a Mojo2 conversion, which does not exist in Blitzmax until Brucey made the port. I'm trying to convert as close as I can without knowing or having any experience with mojo and mojo2 before. If I were to do it on my own from scratch, that would certainly not be the case. ;-) In the end, we all make small mistakes or miss something every now and then, even if we impose this type of strictness method, and we're not just talking about typos that makes into commits.. ;-) |