need help converting...
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

need help converting...

Started by ConejoDelMal, 07 April, 2005, 09:00:45

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ConejoDelMal

I've got a script that i'm trying to convert to lua 5, but when i debug it it gives me an error...
"392: expected near `in' "

here's the line of the script:
info.in = GetTime()
hope its enough info...script is huge..
Rede-DC Comunidade Portuguesa de DC

Dessamator

try this :
info["in"] = GetTime()


but well, i dont think it will work,it depends on the script, and what it really wants, anyways give it a try !
Ignorance is Bliss.

jiten

I guess that Dessamator is correct  ;)
Anyway, if it doesn't work could u post the script here?

ConejoDelMal

Well...debugger doesnt complains about those lines anymore....but i got other errors.. like:

" unexpected symbol near `.' "
local math.log = "Base-Dados/UserInfo/"..string.lower(usr)..".info"
So...till all this is fixed..no idea if the other functions are working...
Not sure i can post the whole script here...but i'm working on it
Rede-DC Comunidade Portuguesa de DC

Herodes

QuoteOriginally posted by [AT]conejodelmal
Well...debugger doesnt complains about those lines anymore....but i got other errors.. like:

" unexpected symbol near `.' "
local math.log = "Base-Dados/UserInfo/"..string.lower(usr)..".info"
So...till all this is fixed..no idea if the other functions are working...
Not sure i can post the whole script here...but i'm working on it
the problem with this local variable declaration is that it is trying to declare an index (log) of a global table (math) as a local variable. I encountered this lately in many scripts and in a weird way they all relate to math.log.. ;)
this is in my opinion because the script was run throught a Lua425 (or similar) converter which encountered a string 'log' and assumed that it must be converted to 'math.log'.. so switching it back should do the trick ..I hope ..

ConejoDelMal

Thx a lot Herodes! It was as you said... switched back and no more error.... at least not that one :P
Now i got an " expected near `in' " in the line:
sTmp = sTmp.."\r\n"..SHOWINFOFUNCMSG8.."\t"..info.in
Rede-DC Comunidade Portuguesa de DC

Herodes

[AT]conejodelmal : are you trying to convert BrainMaster ? cause if you are,.. I think there are going to be more than 'a couple of stops' until it is done ..

ConejoDelMal

yeah, i was trying.... but just to learn from it, to understand better the changes between lua 4 and 5. I guess that anyway a lot of functions would need to be changed because of the new ptokax...
Rede-DC Comunidade Portuguesa de DC

Herodes

QuoteOriginally posted by [AT]conejodelmal
yeah, i was trying.... but just to learn from it, to understand better the changes between lua 4 and 5. I guess that anyway a lot of functions would need to be changed because of the new ptokax...
all I can tell you is that nErBoS is a good teacher through his scripts. He writes clean, and has a good way to do things. Although you should be looking at small scripts and play with those a lot before starting on smth as big as BrainMaster ..

ConejoDelMal

QuoteOriginally posted by Herodes all I can tell you is that nErBoS is a good teacher through his scripts. He writes clean, and has a good way to do things. Although you should be looking at small scripts and play with those a lot before starting on smth as big as BrainMaster ..
yeah, maybe i should do that... but i got enthusiastic about something like that... leeding to nowhere probably  :P
Rede-DC Comunidade Portuguesa de DC

SMF spam blocked by CleanTalk