Closed PrinterLUA closed 11 years ago
Well, Mark said you need to update your sources and recompile. I've tested this function to double-check; it seems to be working fine.
function onSay(cid, words, param)
local t = getTownTemplePosition(1)
print("{x = " .. t.x .. ", y = " .. t.y .. ", z = " .. t.z .. "}")
return true
end
But ive already downloaded latest source, i think. Can you give me the link to your download, so i can retry. And could you tell me which boost and libraries you are using to compile? Myabe my compiler fucks it up.
I just downloaded from here: https://github.com/otland/forgottenserver (I haven't familiarized myself using the GitHub desktop app thingy to clone and all)
When compiling, make sure you update the project files.
I'm using the original SDK from Kornholijo with a change to update Boost to 1.53. I'm also using my method of compiling (modified settings.prop), that thread is outdated for the record. Maybe someday I'll do another tutorial (without modifying settings.prop) for compiling TFS 1.0 (no promises).
Anyways, this is all based on my experiences, I'm sure someone else can give you a much more reasonable and better answer.
Could you just please upload the exe file :/ until i get a dedicate server so i will use linux ^^
Thanks :D
Everything works properly, make sure you update both your sources and data folder, then recompile.
I already done it, so please someone upload the latest compiled exe thanks :)
Between did anyone else try out the script i posted? and see if you get same error? Since i tested evan script didnt give any startup error, so what is the wrong with the script i got?
You won't get any startup error with Evan's script because it has correct Lua syntax, the Town constructor is only called when onSay is called and your executable seems to be compiled without that.
How is it compiled without it? I just download it fresh, and added the code i provided and gave error. Are you sure that i could even use that function with table?
We told you that IT IS COMPILED WITHOUT IT. That's all we can tell you, we don't have logs of your computer activity to tell you how the hell you managed to compile without it.
Besides, even if you get it to work, it's going to return false because towns haven't been loaded when the global Lua space is being evaluated.
Example script:
local townPositions = {
[1000] = getTownTemplePosition(0),
[1001] = getTownTemplePosition(1),
[1002] = getTownTemplePosition(2),
[1003] = getTownTemplePosition(3),
[1004] = getTownTemplePosition(4),
[1005] = getTownTemplePosition(5)
}
for k, v in pairs(townPositions) do
print(k, v)
end
Output: 1002 false 1000 false 1004 false 1005 false 1003 false 1001 false 1002 false 1000 false 1004 false 1005 false 1003 false 1001 false
Hi,
Well i claimed that there is function which have been moved from source to compat.lua and i get this error: https://github.com/otland/forgottenserver/issues/89
Ive download the latest from github, compiled but still same error what im doing wrong?
Thanks.