Hrm, more interest in this than I had expected 
I hope at least a few of you get entries put together. Good luck everybody!

I hope at least a few of you get entries put together. Good luck everybody!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: MashPotato on Thu 29/06/2006 23:19:37
Redwall: Yup, shark protection! ^_^
struct JournalModule {
import static function AddEntry(String Text);
//some other functions
};
function AddEntry(String Text) {
//function contents
}
Quote
Script link failed: Runtime error: unresolved import 'JournalModule::AddEntry^1'
Quote from: Lyaer on Thu 29/06/2006 11:09:51I hope you will not mind me lurking.
Quote
'static' only applies to member functions.
QuoteHave a go with Akumayo's code, it's really not as complicated to do as it sounds. The only problems with it are
struct Some_Struct {
import static function MyFunction(String MyString);
...
};
Some_Struct.MyFunction("This is a string.");
Quote
Script link failed: Runtime error: unresolved import 'Some_Struct::MyFunction^1'
struct Some_Struct {
Ã, import static function MyFunction(String UserString, int UserInteger=-1);
Ã, ...
};
Some_Struct.MyFunction("This is a string.");
Some_Struct.MyFunction("This is a string.", 7);
Quote
Script link failed:Ã, Runtime error:Ã, unresolved import 'Some_Struct::MyFunction^7'
#DEFINE Max_JournalEntries 16
String JournalEntry[Max_JournalEntries];
JournalEntry[0].Text = String.Format("This is the first journal entry.");
JournalEntry[1].Text = String.Format("This is the second journal entry.");
int labelA_entry = 0;
int labelB_entry = 1;
//since these are real entries by default, you must set the values of JournalEntry[0].Text and JournalEntry[1].Text, probably in the game_startup() script.Ã, You can make them blank by JournalEntry[0].Text = " ";
repeatedly_excecute() {
Ã, if (labelA_entry != -1)Ã, JournalLabelA.Text = labelA_entry;
Ã, if (labelB_entry != -1)Ã, JournalLabelB.Text = labelB_entry;
}
//Scroll Up button pressed code
if (labelA_entry != 0) {
Ã, labelA_entry --;
Ã, labelB_entry --;
}
//Scroll Down button pressed code
if (labelB_entry != Max_JournalEntries - 1) {
Ã, labelA_entry ++;
Ã, labelB_entry ++;
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.058 seconds with 17 queries.