[PROBLEM]Crafting System *Lite*

01/30/2014 10:24 IGotPower#1
my cube.lua

PHP Code:
function cube_open(vnum)
    
cube_results = {}
    
cube_needs = {}

    
cube_results[20018] = "39031,1/71018,10/71019,10"
    
cube_needs[20018] = "35011,5&35016,2@35012,200@35013,200"    

    
cmdchat("cube_npc_id "..vnum.."")
    
cmdchat("cs_result "..cube_results[vnum].."")
    
cmdchat("cs_need "..cube_needs[vnum].."")
    
command("cube open")

    return
end 
But just appears first material item second material item doesn't appear:

[Only registered and activated users can see links. Click Here To Register...]

please help me.

thx.
01/30/2014 10:58 #dynastie#2
Quote:
Originally Posted by IGotPower View Post
my cube.lua

PHP Code:
function cube_open(vnum)
    
cube_results = {}
    
cube_needs = {}

    
cube_results[20018] = "39031,1/71018,10/71019,10"
    
cube_needs[20018] = "35011,5&35016,2@35012,200@35013,200"    

    
cmdchat("cube_npc_id "..vnum.."")
    
cmdchat("cs_result "..cube_results[vnum].."")
    
cmdchat("cs_need "..cube_needs[vnum].."")
    
command("cube open")

    return
end 
But just appears first material item second material item doesn't appear:

[Only registered and activated users can see links. Click Here To Register...]

please help me.

thx.
Seems like there is an syntax fail: cube_needs[20018] = "35011,5&35016,2@35012,200@35013,200" (5&35016,2) so u have to change it into a @ i think, i'm using the official system, so just try it.