Forum

> > CS2D > Scripts > rp_austor_5.1 Error script
Forums overviewCS2D overview Scripts overviewLog in to reply

English rp_austor_5.1 Error script

11 replies
To the start Previous 1 Next To the start

old rp_austor_5.1 Error script

M0BSTAZ
User Off Offline

Quote
Hi..guys

I need little help for this roleplay script!
I make this script,BUT not finished,I need to solved this problem..

1
LUA ERROR: sys/lua/autorun/rp_austor_5.1.lua:7: attempt to call global 'wallet_removerp_money' (a nil value)

and this is one..

1
2
3
4
5
function aus_pay(id, rp_money)

	return wallet_removerp_money(id, rp_money)
--msg2(id, "You've lost "..rp_money.."$")
end

To buy this Hotel..

1
2
3
4
5
6
7
8
9
10
11
function aus_hotelmact(id,t,b)

	if(t == "Hotel - Central" and aus_pay(id, 300) == true) then
		parse("setpos "..id.." "..((hotel1_info[b][1]*32)+16).." "..((hotel1_info[b][2]*32)+16))
		parse("triggerposition 19 12")
	elseif(t == "Hotel - Township" and aus_pay(id, 200) == true) then
		parse("setpos "..id.." "..((hotel2_info[b][1]*32)+16).." "..((hotel2_info[b][2]*32)+16))
		parse("triggerposition 377 139")
	end

end

Thanks for helping..

old Re: rp_austor_5.1 Error script

Mora
User Playing CS2D

Quote
1
2
3
4
5
function aus_pay(id, rp_money)

     return wallet_removerp_money(id, rp_money)
--msg2(id, "You've lost "..rp_money.."$")
end

i think use for it
return aus_pay but not wallet_removerp_money

and i think you use
--msg2... <-it may not display,try w/o them(--)
msg2...

old Re: rp_austor_5.1 Error script

M0BSTAZ
User Off Offline

Quote
Edit:

@user MikuAuahDark: it's de-same (Not responding)

1
LUA ERROR: sys/lua/autorun/rp_austor_5.1.lua:7: stack overflow

and this..

1
2
3
4
5
6
function aus_pay(id, rp_money)

	aus_pay(id, rp_money)
return
msg2(id, "You've lost "..rp_money.."$")
end

old Re: rp_austor_5.1 Error script

massiveguy
User Off Offline

Quote
are you sure that you have c4's script too? if not, problems found.
as i know you need whole c4 server's script to run rp_austor map
if you haven', there will be NO money and NO automatically spawning super supply

old Re: rp_austor_5.1 Error script

ohaz
User Off Offline

Quote
user Mora has written
1
2
3
4
5
function aus_pay(id, rp_money)

     return wallet_removerp_money(id, rp_money)
--msg2(id, "You've lost "..rp_money.."$")
end

i think use for it
return aus_pay but not wallet_removerp_money
Please, if you have no clue, don't talk about it. Your code leads to an endless recursion.
user Mora has written
@user MikuAuahDark: it's de-same (Not responding)

Code:
1
LUA ERROR: sys/lua/autorun/rp_austor_5.1.lua:7: stack overflow
Don't do that. It just makes it worse

old Re: rp_austor_5.1 Error script

Avo
User Off Offline

Quote
Try to check if wallet_removerp_money function exists.Maybe it's just a typo and it should be something like wallet_remove_rp_money?

old Re: rp_austor_5.1 Error script

MikuAuahDark
User Off Offline

Quote
user M0BSTAZ has written
Edit:

@user MikuAuahDark: it's de-same (Not responding)

1
LUA ERROR: sys/lua/autorun/rp_austor_5.1.lua:7: stack overflow

and this..

1
2
3
4
5
6
function aus_pay(id, rp_money)

	aus_pay(id, rp_money)
return
msg2(id, "You've lost "..rp_money.."$")
end

You don't understand me.
1
2
3
4
5
6
function aus_pay(id, rp_money)
	-- Place your code before return keyword
	msg2(id, "You've lost "..rp_money.."$")
	return (wallet_removerp_money or wallet_remove_rp_money)(id,rp_money)	-- this is return keyword. I also add what Avobolt says
	-- Never place anything below "return" word above unless comment and/or "end" keyword
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview