Forum

> > CS2D > Scripts > Script Error
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script Error

4 replies
To the start Previous 1 Next To the start

old Script Error

NanuPlayer
User Off Offline

Quote
I have an error with this script


1
2
3
4
5
6
7
8
9
10
11
12
if ( action == 2 ) then
 if policeboss[id] == 1 and wallhack[id] == "Disabled" then
				wallhack[id] = "Enabled"
				else
 if policeboss[id] == 1 and wallhack[id] == "Enabled" then
				wallhack[id]= "Disabled"
				else
                msg2(id,"\169255255000[ Information ]: ".."\169255000000You are not able to use this command")
					end
                end
            end
        end

Its keep showing me that i can not use this command and my policeboss[id] is 1 ( Already enabled )
and when i remove the policeboss[id] the command works again

someone have fix or something...?

old Re: Script Error

NanuPlayer
User Off Offline

Quote
@user cs2d_is_a_Gem:

That did not help me at all my script is completely different than that player script

Just edit the script and fix the problem and give it to me again, i do not really understand by reading .-. sorry for that

old Re: Script Error

Cebra
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
policeboss = initArray(32,1)
wallhack = initArray(32,"Disabled")

addhook("serveraction","act")
function act(id,action)
	if ( action == 2 ) then
		if policeboss[id] == 1 and wallhack[id] == "Disabled" then
			wallhack[id] = "Enabled"
			msg("Enabled")
		else if policeboss[id] == 1 and wallhack[id] == "Enabled" then
			wallhack[id] = "Disabled"
			msg("Disabled")
		else
			msg2(id,"\169255255000[ Information ]: ".."\169255000000You are not able to use this command")
		end
	end
end
end
(i didn't change anything except of the msg("Enable") and msg("Disable"))
in this way it works, but if we should help you, we need the complete function/script
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview