English something wrong..

4 replies
Goto Page
To the start Previous 1 Next To the start
16.08.12 06:33:01 pm
Up
sqpp15
Super User
Offline Off
Hi something wrong with this part of lua because i get this in console:
LUA ERROR: sys/lua/IF/sys/hooks.lua:337: attempt to index global 'havebal' (a nil value)

Code:
1
2
3
4
5
6
7
function rp_drop(id,iid,type,ain,a,mode,x,y)
     if havebal[id]==true then
          parse("strip "..id.." "..type)
          parse("spawnitem "..type.." "..x.." "..y)
          havebal[id]=false
          return 1
     end


Someone know the solution?
16.08.12 06:36:06 pm
Up
KINGGOLDrus
User
Offline Off
Add:
Code:
1
havebal={}
16.08.12 06:37:27 pm
Up
Suprise
BANNED
Offline Off
Create a function for havebal.

EDIT: Or what @user KINGGOLDrus: said.
16.08.12 07:49:26 pm
Up
RedizGaming
GAME BANNED
Offline Off
Code:
1
2
3
4
5
6
7
8
9
10
havebal = {}

function rp_drop(id,iid,type,ain,a,mode,x,y)
     if havebal[id]==true then
          parse("strip "..id.." "..type)
          parse("spawnitem "..type.." "..x.." "..y)
          havebal[id]=false
          return 1
     end
end


@user sqpp15:
Never use HACKS/CHEATS , see my status. I used hack 2 times , 1 year ago... i get game banned for be a stupid guy
17.08.12 12:25:03 am
Up
VADemon
User
Offline Off
Sry, but: ARE YOU STUPID PPL? (not you CyberMaster)
Are you looking into his code before helping?

Code:
1
if havebal[id]==true then


1) CyberMaster, as other said there's no table called havebal
1.1) You also forgot to add per-user key in that table (array for 32 IDs)

2)
Code:
1
if havebal[id]==true then

You should change it to
Code:
1
if havebal[id] then

because it's the same if that value is true or false
...aaand it's a bit faster
edited 1×, last 17.08.12 04:41:40 am
To the start Previous 1 Next To the start