Forum

> > CS2D > Scripts > Can you fix this (new) script?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Can you fix this (new) script?

15 replies
To the start Previous 1 Next To the start

old Can you fix this (new) script?

Mami Tomoe
User Off Offline

Quote
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)? >

old Re: Can you fix this (new) script?

Mami Tomoe
User Off Offline

Quote
@user omg: I added "end" in the end of the code and I got the
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.

old Re: Can you fix this (new) script?

Nekomata
User Off Offline

Quote
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.

old Re: Can you fix this (new) script?

Nekomata
User Off Offline

Quote
nice.


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

edit: moshi moshi? debug report desu

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

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

Do me a favor, check your user data file;
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview