English Can you fix this (new) script?

15 replies
Goto Page
To the start Previous 1 Next To the start
Up
Mami Tomoe
User
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
elseif cmd == "!vip" then
                    if rp_Adminlevel[id] >= makect_lv then
                         local pl = tonumber(p[2])
                         if pl ~= nil then
                              if player(pl,"exists") then
                                   gmsg2(pl,"000000255","You are now a VIP!")
                                   gmsg2(id,"000000255","He is now a VIP!")
                                   rp_vip[pl] = true
                              end
                         end     
                    else
                         gmsg2(id,"255000000","You don't have premission.")     
                    end


This script shows a error "end expected in line 350"
I did added a end there but than it redirect me to another line and so on, so I removed this command and the script worked which means the error is from this code.

I feel like I'm missing some important command or something which causes it.

Can you help?

Why (new)? >
fish
30.08.15 02:27:44 am
Up
omg
User
Offline Off
end the elseif and win the game
will code for food
30.08.15 02:40:46 am
Up
Mami Tomoe
User
Offline Off
@user omg: I added "end" in the end of the code and I got the
Code:
1
LUA ERROR: sys/lua/IF/sys/functions.lua:362: 'end' expected (to close 'if' at line 350) near 'elseif'


No there is no end required there since when I remove the "!vip" code the lua works fine.
fish
30.08.15 03:03:41 am
Up
TimeQuesT
User
Offline Off
The master calls for teh code.
Muh
30.08.15 04:22:49 am
Up
Mami Tomoe
User
Offline Off
@user TimeQuesT: I think that what you meant: http://pastie.org/10384791
fish
30.08.15 07:04:05 am
Up
Mora_rus
User
Offline Off
add the end of function:
function ParseCommand(id,txt)
30.08.15 07:13:50 am
Up
Mami Tomoe
User
Offline Off
@user Mora_rus: Idk how to script... what does it mean?
fish
30.08.15 11:18:28 am
Up
Marcell
Super User
Offline Off
Post full code.
30.08.15 12:34:23 pm
Up
Nekomata
User
Offline Off
Replace your parseCommand() here function with this
30.08.15 01:29:10 pm
Up
Mami Tomoe
User
Offline Off
@user Nekomata:
Code:
1
LUA ERROR: sys/lua/IF/sys/functions.lua:160: 'end' expected (to close 'if' at line 148) near 'elseif'
fish
30.08.15 04:45:01 pm
Up
Nekomata
User
Offline Off
Found your little bug. Here, it should work now: http://pastebin.com/MztdRPtn
30.08.15 05:27:25 pm
Up
Mami Tomoe
User
Offline Off
@user Nekomata:
Code:
1
LUA ERROR: sys/lua/IF/sys/functions.lua:5: unexpected symbol near '2.'
fish
30.08.15 08:25:46 pm
Up
Nekomata
User
Offline Off
Paste the complete functions.lua file at pastie. I'll take a look at it directly from there. It'd be easier to know what that line 5 contains.
31.08.15 12:11:17 pm
Up
Mami Tomoe
User
Offline Off
fish
31.08.15 04:57:56 pm
Up
Nekomata
User
Offline Off
nice.


I'll update here and let you know, just....send scripts properly next time, ty.

edit: moshi moshi? debug report desu

Code:
1
LUA ERROR: sys/lua/IF/sys/functions.lua:5: unexpected symbol near '2.'


This is at line 5:
Code:
1
if rp_Adminlevel[id] >= money_lv then


Do me a favor, check your user data file;
Code:
1
local filename = "sys/lua/IF/User data/"..UsgnID..".txt"


Which should be at sys/lua/IF/User data/<your usgn>.txt

[strike]Make sure you admin rank is not '2.' and is just '2'.[/strike]
Actually just show me your user data file, everything in it.
edited 4×, last 31.08.15 05:10:24 pm
10.11.15 04:44:33 pm
Up
Slooper 1
BANNED
Offline Off
its easy make an other end below
Multiple account of Ya_Bogalb (a.k.a TN Anonymous)
To the start Previous 1 Next To the start