Combining tabled strings
Status: Alpha
Brought to you by:
cwalther
|
From: James C. W. <jfc...@ya...> - 2011-11-29 22:05:29
|
I'm trying to combine the values of several variables into a single literal string for checking equality. In this case the subject is an ingame computer into which the player must type commands. I've got everything to work perfectly except for this one issue: local execute = ""..keypress[1]..""..keypress[2]..""..keypress[3].. ""..keypress[4].. ""..keypress[5].. ""..keypress[6].. ""..keypress[7].. ""..keypress[8].. ""..keypress[9].. ""..keypress[10].. "" Each tabled variable represents either a typed character or a space, depending on what the player has typed, all combined into a single string. if execute == "map" then The purpose of this is to check if the player typed "map" and if so direct further action. However it seems that Pipmak does not interpret and break down this combined string in the same way it would if the string were the filename of a patch or the text of a drawtext() operation, which is what I was hoping for. Instead I receive an "unexpected symbol near "if" error. Thanks, James CW |