Character[]. variables? (SOLVED)

Started by Edwin Xie, Mon 25/10/2004 04:45:44

Previous topic - Next topic

Edwin Xie

I get a problem when trying to type:
Code: ags

curroomnumberint=character[CHARID].room

which gives me this error:
---------------------------
Compile Error
---------------------------
There was an error compiling your script. The problem was in 'Main script':



Error (line 422): missing ']'



Do you want to fix the script now? (Your game has not been saved).
---------------------------
Yes   No   
---------------------------

The code I gave above is line 422.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

strazer

Try adding a semi-colon to the end of the line.
You may also want to change "CHARID" to "GetPlayerCharacter()".

Edwin Xie

Thanks, but following that, there is another problem I would like you to fix:
How do I correct this?:

SetLabelText(11,3,"Enter new room: (in room %d)",curroomnumberint);

There was an error that said there were wrong numbers of parameters for SetLabelText.
Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

strazer

You can't use that %d thing with SetLabelText.
Do this:

string buffer;
StrFormat(buffer, "Enter new room: (in room %d)", curroomnumberint);
SetLabelText(11, 3, buffer);

Edwin Xie

Moving at superhigh speed getting to the planet called Earth. But it is boxed in white......thing.....

SMF spam blocked by CleanTalk