'LinKin Posted February 22, 2014 Posted February 22, 2014 So I've these variables: num1 acc1 top1 num2 acc2 top2 num3 acc3 top3 num4 acc4 top4 num5 acc5 top5 num6 acc6 top6 Those are GUI Labels. In the client, I recieve a table containing info about tops, so I want to set these GUI text to the values that the table brings. But how? I tried this. But it shows an error in the debug attempt to concatenate global 'num' (a nil value) for i = 1, #returnTable do guiSetText(num..i , returnTable[i][1]) guiSetText(acc..i , returnTable[i][2]) guiSetText(top..i , returnTable[i][3]) end Do you understand what I'm trying to do? - Suggestions please. Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Castillo Posted February 22, 2014 Posted February 22, 2014 You got variables like this? num1 = guiCreateLabel ( ) if so, then that'll never work, use tables. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Moderators Citizen Posted February 22, 2014 Moderators Posted February 22, 2014 So I've these variables:num1 acc1 top1 num2 acc2 top2 num3 acc3 top3 num4 acc4 top4 num5 acc5 top5 num6 acc6 top6 No need to be a pro scripter to say you should use a table. Btw to answer your question, you can use loadstring. But it needs a lot of computer/server resources (relativly with a code which would use tables): for i = 1, #returnTable do loadstring("guiSetText(num"..i..", returnTable[i][1])")() loadstring("guiSetText(acc"..i..", returnTable[i][2])")() loadstring("guiSetText(top"..i..", returnTable[i][3])")() end The rEvolution is coming ...
'LinKin Posted February 22, 2014 Author Posted February 22, 2014 Thanks Need a clanwar script? Click here! Do you want some free scripts for your DD server? Visit my website.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now