Questions tagged [ptokax]

PtokaX Direct Connect Hub is a multi-platform server application for Neo-Modus Direct Connect Peer-To-Peer sharing network.

Introduction

PtokaX is a server application, originally proposed as a C++ alternative to the Visual Basic Neo-Modus Direct Connect Hub.

Links:

11 questions
2
votes
1 answer

GROUP_CONCAT but with limits to get more than one row

I am developing a small jumbled-words game for users on a PtokaX DC hub I manage. For this, I'm storing the list of words inside a MySQL table. Table schema is as follows: CREATE TABLE `jumblewords` ( `id` INT(10) UNSIGNED NOT NULL…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
1
vote
2 answers

Break a string to table

Currently, I am using this function: function tokenize( str ) local ret = {} string.gsub( str, "([-%w%p()%[%]®+]+)", function( s ) table.insert( ret, s ) end ) return ret end Now, the string can have any character in it(as is clear from…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
1
vote
1 answer

add variable value in table in lua for ptokax script

Recently i updated my ptokax to 0.5.3 and since then my votekick script has stopped working as in my script takes input from other online users as 1 or 2 as accept or deny the user to be kicked or not but now whenever the user enters 1 or 2 the…
warl0ck
  • 3,356
  • 4
  • 27
  • 57
1
vote
1 answer

Adding a command to the ptokax GUI so as to give Profile Permissions

As there are the commands like tempban, permban, etc which can be given permissions for profiles using the ptokax GUI under the profile manager. I have made a script and i want to add my command to the GUI. How can i do this?
mental
  • 13
  • 2
1
vote
1 answer

Why is `sData` a non-nil value?

Execution of the code is here on eval.in sMessage = " +help|" local _, _, sCmd, sData = sMessage:find( "%b<>%s[%+%-%*%/%!%#%?](%w+)%s?(.*)|" ) print( _, sData, sCmd ) The output of print says the my sData is a value with empty…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
1
vote
3 answers

String Concatenation

As I asked in my previous question(Link) about concatenating a multipart string of variable lengths, I used the method answered there by rkhayrov and now, my function looks like this: local sToReturn = string.format( "\t%03s\t%-25s\t%-7s\n\t", "S.…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
0
votes
1 answer

Update complete table, interchange columns

OK, here's a new problem for me. As I once mentioned in one of my earlier questions, I am now using PtokaX and scripting some bots in it. What I need now to do is update my table completely, and interchange the values of two particular columns. I am…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
0
votes
1 answer

The os.date function isn't returning desired outcomes

I'm inserting a string variable to my MySQL table using this os.date() function call: tSend["sDate"] = os.date( "%Y-%m-%d %X", Core.GetUserValue(v, 25) ) The table tSend is forwarded to another function which inserts it into the table. This doesn't…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
0
votes
1 answer

A procedure or a loop

I've a table named messages where users of my local hub store their messages(kind of like a web-forums). Currently, a majority of users are participating and I get nearly 30 to 50 new entries to my table everyday. Since this has been going on for…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
0
votes
1 answer

Concatenate variable-length-strings as table

I am fetching an array of data from SQL, and then concatenating them as strings for display. The function looks like this: function FetchTopStats( Conn, iLimit ) local sToReturn = "\tS.No. \t UserName \t Score\n\t" SQLQuery = assert(…
hjpotter92
  • 78,589
  • 36
  • 144
  • 183
-3
votes
1 answer

I cant figure out the why the 2 editors give different syntax errors for the same script

I am getting an error when i compile this lua script. The LUA editor and ptokaX Server seem to think so. I am unable to figure out the error. The LUA Editor says the error is in dofile( path.."files/mcunsubs.txt" ). The PtokaX Editor says that the…