SetLabelText Strings... [Solved!]

Started by Phemar, Tue 08/06/2004 05:39:45

Previous topic - Next topic

Phemar

I'm sorry for bugging you, but why won't this work, and how do I geta string to display properly?
string inventory;

function repeatedly_execute () {
  if (GetCursorMode()==4) {
    GetInvName (player.activeinv, inventory);
    SetLabelText (MAINGUI, 13, "Use %s with @OVERHOTSPOT@", inventory);
    }


All it says is invalid parameters for SetLabelText. All I want to do is get it to display the current inventory by the %s?

LordHart

You have too many variables there for SetLabelText... it should only have 3, while you have 4.

I did something similar to this with something I did a while ago, but I can't remember exactly how to do it.

I think I used the StrFormat function, but I'm not too sure.  :-\

®2-D2

StrFormat(buffer, "Use %s with @OVERHOTSPOT@", inventory);
SetLabelText(MAINGUI, 13, buffer);

Phemar


Hey thanks R2!

Mods you can delete this topic if you want...

SMF spam blocked by CleanTalk