Hello!
First thread! I apologize if this is posted in the wrong section...please be gentle in your reprimands...
I'm trying my hand at developing a few game ideas using AGK. I enjoy the platform so far. I purchased the Hands on AppGameKit and the Teach Yourself Stuff books and am using those as guides.
My first real project for me was to replicate Daniel's Space Fighter Project Alpha; however, I've run into a parameter mismatch error I haven't been able to figure out.
While it would be great if someone familiar with the game could comment on the code specifically (pasted below for your convenience), that wouldn't necessarily help me learn. So one thing I'd really appreciate from you AppGameKit pros is tips/strategies for troubleshooting similar types of errors in the future.
The specific problem I'm receiving when I try to compile (f5), is "Parameter mismatch in expression 'MakeText' at line 40 inside media.agc"
Here's the code:
Function CreateTextObjects()
Text.iCentreMessage = MakeText( "Loading Messages here… ", Media.iFontImage, 20, 1, System.iScreen_W / 2, System.iScreen_H / 2 - 10, 0 )
Text.iMainTitle = MakeText( "The Space Fighter Project", Media.iFontImage, 48, 1, System.iScreen_W / 2, 25, 1 )
Text.iSubTitle = MakeText( "Alpha", Media.iFontImage, 56, 1, System.iScreen_W * 0.5425, 5 + GetTextTotalHeight( Text.iMainTitle ), 1 )
Text.iAccuracy = MakeText( "Accuracy: 0%", Media.iFontImage, 26, 1, System.iScreen_W * 0.25, System.iScreen_H * 0.9, 0 ): SetTextColor( Text.iAccuracy, Cyan, 255 )
Text.iRating = MakeText( "Rating: 0", Media.iFontImage, 26, 1, System.iScreen_W * 0.5, System.iScreen_H * 0.9, 0 ) : SetTextColor( Text.iRating, Cyan, 255 )
Text.iScore = MakeText( "Score: 0", Media.iFontImage, 26, 1, System.iScreen_W * 0.75, System.iScreen_H * 0.9, 0 ) : SetTextColor( Text.iScore, Yellow, 255 )
//Text.iHighscore = MakeText( "000000", Media.iFontImage, 26, 1, System.iScreen_W / 2, 20, 0 ) : SetTextColor( Text.iHighscore, Red, 255 )
Text.iLocal_HighscoreTable = MakeText( "", Media.iFontImage, 26, 1, System.iScreen_W * 0.5, System.iScreen_H * 0.225, 0 ) : SetTextColor( Text.iLocal_HighscoreTable, Cyan, 255 )
Text.iHighscore_name = MakeText( "", Media.iFontImage, 20, 0, System.iScreen_W * 0.3, System.iScreen_H * 0.21, 1 ) : SetTextColor( Text.iHighscore_name, Cyan, 255 )
Text.iHighscore_rating = MakeText( "", Media.iFontImage, 20, 1, System.iScreen_H * 0.21, 1 ) : SetTextColor) Text.iHighscore_rating, Cyan, 255 )
Text.iHighscore_accuracy = MakeText( "", Media.iFontImage, 20, 1, System.iScreen_W * 0.575, System_H * 0.21, 1 ) : SetTextColor( Text.iHighscore_accuracy, Cyan, 255 )
Text.iHighscore_score = MakeText( "", Media.iFontImage, 20, 1, System.iScreen_W * 0.975, System.iScreen_H * 0.21, 1 ) : SetTextColor( Text.iHighscore_score, Cyan, 255 )
EndFunction
If there's more parts of the code I need to paste in here, please advise.
In my research of commands, I couldn't find the "MakeText" command. Is it defunct, or is my understand of commands and functions flawed? I also tried replacing "MakeText" with "CreateText" and that didn't work either.
Anyway, any thoughts or help would be greatly appreciated by this newb. Thanks in advance!
DE