Forum Replies Created
-
AuthorPosts
-
>Not a bug. Using a leading 0 is how you type numbers in octal with Monkey2.
Really! That’s kind of weak. It should have a symbol or something that’s different than just 0s.
Definitely a bug. Post it on GitHub. Thats the proper way to report bugs.
you need to
#import “level1.txt”xor = “~”.
and = “&”
or = “|”it works in my MacBook. I will update to the latest version of M2 to make sure it still works or not.
[Edit]
My fault, I misunderstood the concept. correction it doesn’t work.I believe you can do it like this also:
canvas.Color.R = .5
canvas.Color.G = .5
canvas.Color.B = .1
canvas.Color.A = 1.0
not much faster then using New with a Struct though. Probably slower.LOL. That was funny Mark.
would this work for you?:
[/crayon]Monkey1234567891011121314151617[crayon-5cba9fb733f9d052874113 inline="true" ]#Import "<std>"Using std..Function Main()Local b:Int[] = New int[5]Local a:String = "Hello World"b[0] = a[0]b[1] = a[1]b[2] = a[2]b[3] = a[3]b[4] = a[4]Print String.FromChars(b)Endtreat a function as you would use any independent function. with the exception that if the function is inside a class you can only call it by the class instantiation or by using the class name.functionname(). With method you can only call it if it has been instantiated. and only through it’s instance.
As papgar said and that’s how it’s supposed to be.
also the method moveallright all and drawall should be functions that way there won’t be any confusion on its use. this way you won’t need to use miunit.first.etc.. all you need to do is use unit.moveallright() and unit.drawall()I am not sure what you mean. Are you extending the list class with your own method or are you using it some other way?
if you declare the list Global and initialize it only once, it should be possible.Well Pakz demo works on my 2013 MacBook Air. So OS X is not far off.
[edit]
using Safari.can’t you cast it to an integer? I think that’s what I did to one of my games.
can’t you do this for now?:
Field keyPress := Key.X
later
keyPress = Key.ZI see. But strange still.
I was going to post the exact code but I have since modified it and can’t exactly remember how I had it that it was giving me wrong values with a Rnd assignment to an integer. I tried to duplicate it but can’t do it anymore. It wasn’t a constant value.
Oh well it will probably will creep in some other project again. -
AuthorPosts