Author Topic: Lua Error (CS2D)  (Read 1000 times)

Code: [Select]
function rpmenu(player, text)
if(text == "!buyhealth")then
if(player(player, money) > 10)then
msg("MIRACLES!")
end
end
end

I'm trying to make a script for CS2D to make it so when I type "!buyhealth", it'll check if I have enough money and write MIRACLES! on the screen.  (The miracles part is a place holder.)

Help please?

Edit: The error is
Code: [Select]
LUA ERROR: sys/lua/zrpg.lua:5: attempt to call local 'player' (a number value)
« Last Edit: March 06, 2011, 09:23:25 PM by brickybob »

Does CS2D have a forum you can post this in? They'll probably be more help than us.

Does CS2D have a forum you can post this in? They'll probably be more help than us.
I was hoping not to take 2 minutes to make an account.

But I'll post there too.

Edit: Bam.
« Last Edit: March 06, 2011, 09:31:40 PM by brickybob »

I play, but I can`t script.