Baffled
Monkey Forums/Monkey Programming/Baffled
| ||
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. |
| ||
If you want to access functions from a class do this:Class.FunctionName() In your case TStar.CreateStars (1000) TStar.DrawStarsH() |
| ||
made the change. Me code still not run bud. |
| ||
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. |
| ||
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 |
| ||
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.. |
| ||
Top Nanas.You have my coconut. |