Major problem running LUA-scripts
 

Major problem running LUA-scripts

Started by Buhmann, 08 September, 2010, 12:33:46

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Buhmann

Hi everyone!
I'm running Ptokax 0.4.1.2 in GUI version.
I've been trying to run some LUA 5.1-scripts, but i can't get it working.
In the scripts-menu, all scripts are checked, none has any syntax errors. The script memory usage menu shows all 3 scripts runningAs admin client, I can start, stop and reload any of those scripts, followed by the standard status message "*** admin restarted script: x.lua".

However, none of the script bots appear in the userlist, and i can't use the script's commands.
So far, I've tried RecordBot-v.0.95.lua, simpsons.lua, RecordBot.lua, Chat_History_1.03_L5.1.lua and some others.
Can anyone tell me why the scripts won't start? (In fact, the hub says, they are running, but still, the bots don't appear :( )

PPK

Quote from: Buhmann on 08 September, 2010, 12:33:46
(In fact, the hub says, they are running, but still, the bots don't appear :( )
Not all scripts are stupid and create bot, most of them don't have any good reason to do that  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

bastya_elvtars

Agreed, bot creation almost always serves the purpose of sending PMs because many users have PMs blocked from users that are not online (i. e. in the userlist).
Everything could have been anything else and it would have just as much meaning.

Buhmann

Yeah well, but all scripts i tried use
frmHub:RegBot(bot.sBotName);

and since the commands don't work, the script doesn't seem to be executed.

PPK

Oh, in that case script should show error message. Because that are old lua api script not working on PtokaX 0.4.1.2  ::)
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Buhmann

Old? The scripts I tried are all LUA 5.1. Is there still a newer version?

Just to be sure, can you recommend me any script that is definitely working on the current up-to-date version of ptokax? That way, we can tell if it's a scripting problem or a hub-problem :)

Buhmann

#6
hi again.
i tried your chathistory from http://forum.ptokax.org/index.php?topic=7335.0
and it's giving me some syntax errors:
1) comma after the last "end" (removed it)
2) last } seems to be surplus (removed it)
3) line 40: attempt to index global 'SetMan' (a nil value) (ok, i had to start the hub before trying to start the script)

still: the script is started, but i can't see anything working. chat history is not being sent to me after i log in.

like in all other scripts i tried, i can't use your commands

+delchat        	Delete Single Chat Entry
	+history        	Get Chat History
	+togglehistory  	Toggle Chat History
	+dayhistory     	Chat History By Days
	+chathelp       	Chat History Help
	+delete         	Delete Chat History


what am i doing wrong  ???

Buhmann

heya.
i got the chat history-script working. commands work fine.

however, i can only get the history by typing +history, but i don't get an automated PM or history list in main chat.

i followed your advice at http://forum.ptokax.org/index.php?topic=7335#msg70619 to setup the login auto-history per main chat, not per PM, but it doesn't work.

Can you tell me what i might be doing wrong? ...again? :D

Buhmann

update: everything is fine now. all problems solved :)
there was a syntax error in your post here: http://forum.ptokax.org/index.php?topic=7335#msg70619

Core.SendToNick(user.sNick,"<"..Cfg.Bot.."> "..add..GetChat(Cfg.History))


should be

Core.SendToNick(user.sNick,"<"..Cfg.Bot.."> "..GetChat(Cfg.History))

kammikaze

Hello, i have a problem with the scripts also, they work fine, all commands are working, but the scripts i added are not vissible for reg/vip and kvip, the only script that they can use is top ten. But the script guess game and helpdesk are not vissible for them while operators and higher have all the scripts i added to the hub. How can i set this. In the scripts i cannot find to set per profile(true/false) so thats why i think it must be in the hubsoft. Can anybody help me out?

SMF spam blocked by CleanTalk