Baffled

Monkey Forums/Monkey Programming/Baffled

MaxPower(Posted 2012) [#1]
Hi i think im missing something here.Any help would be super.



Thanks guys

Sorry have not made it clear what im on about here. is this code right
or can i not call functions like this.


Shinkiro1(Posted 2012) [#2]
If you want to access functions from a class do this:
Class.FunctionName()


In your case
TStar.CreateStars (1000)
TStar.DrawStarsH()



MaxPower(Posted 2012) [#3]
made the change.
Me code still not run bud.


muddy_shoes(Posted 2012) [#4]
Shinkiro's answer about calling functions is correct. Your code as posted has a number of other errors that will stop it compiling though. "Me code still not run bud" doesn't really help in explaining what specific error you've got stuck on.


therevills(Posted 2012) [#5]
Try this:



Basic things which were wrong:
* You were doing this: DeviceHeight:Int(), just do DeviceHeight()
* You didnt state a return type in CreateStars (void)
* You were trying to add TStar to sList which isnt defined


Neuro(Posted 2012) [#6]
Where for one thing, the declaration of CreateStars() is not proper :
Function CreateStars(Maxstars:Int)

But should be a Void statement if you're not return anything :
CreateStars:Void (Maxstars:Int))


And you keep calling DeviceWidth:Int(), which should just be :
DeviceWidth()


Also, some other issues... but this code here will run, but i didn't debug it anymore to make it functional :

EDIT : nevermind lol..


MaxPower(Posted 2012) [#7]
Top Nanas.You have my coconut.