Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 20:47

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



table.insert problem LUA Code pls help

Discussion on table.insert problem LUA Code pls help within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Aug 2011
Posts: 17
Received Thanks: 1
table.insert problem LUA Code pls help

Hi guys,

I've some problems with this code:

Code:
local names_list_s = mysql_query("SELECT * FROM player.vote_member WHERE empire = 'SHINSOO'; ")
						local names_list_table = {}
						for i = 1,table.getn(names_list_s),1 do
							table.insert(names_list_table,names_list_s.name[i])
						end
						table.insert(names_list_table,"Close")
						if(table.getn(names_list_s) == 0) then
							say("Error! ")
							say("Returning ...")
						end
						local m = select_table(names_list_table)
						if(table.getn(names_list_table) == s) then
							return
						elseif(table.getn(names_list_table) >= s) then
							say_title(names_list_s.name[m]..": ")
							say("")
							---
							say(names_list_table[m])
							say("")
							say_reward("You wanna vote for him? ")
							local q = select(locale.yes,locale.no)
							if(q == 2) then
								mysql_query("UPDATE player.vote_member SET vote=vote+1 WHERE name = '"..names_list_s.name[m].."'; ")
								pc.setqf("vote", 1)
								chat("Good one  !")
							end
						end
That won't work
It just do the first menu like this

Vote:
Name1
name2
name3
name4
Close

But when i click up to any menu, that's returning and do nothing else...
It suppos to show me that first :
Code:
say_title(names_list_s.name[m]..": ")
							say("")
							---
							say(names_list_table[m])
							say("")
							say_reward("You wanna vote for him? ")
But it just returning to the game...
agronaque512 is offline  
Old 01/13/2014, 18:03   #2
 
elite*gold: 0
Join Date: Aug 2011
Posts: 17
Received Thanks: 1
UP pls !
agronaque512 is offline  
Old 01/13/2014, 19:12   #3
 
Noa_'s Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 605
Received Thanks: 580
if(table.getn(names_list_table) == s) then

"s" ist not defined
Noa_ is offline  
Thanks
1 User
Old 01/13/2014, 19:29   #4
 
elite*gold: 0
Join Date: Aug 2011
Posts: 17
Received Thanks: 1
and what i'm suppos to write to work ?
Cause i've try to replace this "s" by "m" or "names_list_table " or "names_list_s" ... well nothing working... When i just clic on one name, that's end that's all

Any suggestions?

In fact bro,

i need to replace this "s" like u said but i want this "s" be the "Close" option you see? Like if the guy clic "Close" then end and if not then (all the rest) can you help me ?

up pls

Solved ! Thanks to Noa
agronaque512 is offline  
Reply


Similar Threads Similar Threads
I want to insert a player code Bot jail
02/10/2016 - EO PServer Hosting - 5 Replies
I want to insert a player code Bot jail
PHP MSSQL Insert into problem
01/09/2012 - Web Development - 0 Replies
Hey leute, habe folgendes Problem weiß einer wie der insert into aussieht für die Datenbank? ic habs zurzeit so: das isn auszug aus der DB INSERT INTO .. ( , ,
[SUCHE] Kriegergeist INSERT code..
01/03/2012 - Metin2 Private Server - 9 Replies
Huhu zusammen^^ da ich in der Sufu nur die ganze Datei zum einfügen gefunden habe..aber nur den NPC alleine suche.. wollte ich Fragen ob jemand ein TUT hat oder den Query code zum einfügen NPC Value (30122)
i need the code insert a tamed dt pls
10/11/2011 - Rappelz Private Server - 1 Replies
i need the code insert a tamed dt pls this dosent work for me #insert_item(Petcard ID, 1, 1, 1, -2147483648, "char_name")



All times are GMT +1. The time now is 20:49.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.