Menu

Show posts

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 Menu

Messages - QuixoticNeutral

#1
Yes, that fixed it! Thanks for the fast response. :)
#2
Hi all, I'm trying to assign the contents of a textbox into a variable, however for some reason I just can't seem to get it to work. :( The variable will always return null/0. The code looks like it should work as far as I can see:

Code: ags

function tInput_OnActivate(GUIControl *control)
{
  String userInput;
  userInput = tInput.Text;
  Display("Text is: %d", userInput);
}


I feel like the solution is probably really obvious, but I just can't figure it out. :/
#3
Treating each coordinate as a separate word worked perfectly! Thanks for the advice all. :)
#4
Hey all. :)

Apologies if this has already been answered. I've tried looking in the manual and googling, but haven't been able to find an answer for this:

For my game I'd like the player to type in some coordinates for a simple "Please tell me where on the map <macguffin> is." type puzzle.

For illustration the code looks like this:
Code: ags

if (Parser.Said("1,1,1")) {
    Display("You gave the correct coordinate!");
  }


The problem is, the commas are being read by the engine to treat each number as a separate "word", which is giving me errors.

Is there a way to make the parser accept coordinates seperated by commas, or do I need to work around this?

Thanks,
SMF spam blocked by CleanTalk