Forum Replies Created
-
AuthorPosts
-
well I isolated the code and it seems to work fine. it has to be from other files that are accessing it.
Thanks Impixi for your help.
I don’t think that’s the issue. the problem seems to be when creating an instance of generic such as:
</p><p>new T().</p><p>
I think so too.
you can also implement it like this so it won’t look so bad:
Monkey123456789Method Init:Bool()If Not steps Return 0If(steps.First.init=True)Return FalseEndifsteps.First.init=TrueReturn TrueEnd MethodI posted a bug in the development section:
http://monkey2.monkey-x.com/forums/topic/collectionslist-monkey2-error-in-module/#post-1440
fix it and it should take care of most of your errors.
you are going to have to recompile the modules. I think.
uncheck the inline box.
are you using the hyperlink above where you enter your comment?
when you click on it a window pops open and you can paste your code in the code box.
use the “<>” above.
it uses this as a base for all my objects:
Monkey1234567891011121314151617181920Class StoreObjectField _pred:StoreObjectField _succ:StoreObjectFunction Separate:Void(obj:StoreObject)If obj._predIf obj._succobj._pred._succ = obj._succobj._succ._pred = obj._predElseobj._pred._succ = NullEndifElseif obj._succobj._succ._pred = NullEndifEnd FunctionEnd ClassI create instance of it the same way you did in your example. it works fine in monkey1 but I can’t figure this errors out.
thanks Impixi. I was wondering about the casting thing. that solved several errors. but I still get these errors (on my code):
/Users/legend/Desktop/patrol 2/store.monkey2 [38] : Error : Can’t find overload for ‘new(…)’ with argument types ()
/Users/legend/Desktop/patrol 2/store.monkey2 [29] : Error : Missing return statement
/Users/legend/Desktop/patrol 2/store.monkey2 [18] : Error : Can’t find overload for ‘new(…)’ with argument types ()
/Users/legend/Desktop/patrol 2/store.monkey2 [19] : Error : Identifier ‘c’ not found
/Users/legend/Desktop/patrol 2/store.monkey2 [20] : Error : Identifier ‘c’ not foundme too!
I don’t know how that got removed. I do have it on my original code. apparently in the process of figuring out how to post code here it got removed. So the error happen with the “<T>” in place.
so how do you access the method in the extended class are we still using the extended Class?
-
AuthorPosts