I currently have a script set up to pick up a certain item and count it so I can keep track of how many of these said items I have, the problem I have encountered is I'm getting a run-time error when the script runs (it counts the item and everything). The following is the error I receive:
Run-time error
Plugin: dragonball_checker (called from world: Dragonball Evolution)
Immediate execution
[string "Trigger: "]:4: attempt to compare number with string
stack traceback:
[string "Trigger: "]:4: in main chunk
The coding I have is as follows:
pkdball1 = tonumber (GetVariable ("pkdball1")) or 0
pkdball1 = pkdball1 + 1
SetVariable ("pkdball1", pkdball1)
if GetVariable("pkdball1") >= 1 then
if GetVariable("pkdball2") >= 1 then
if GetVariable("pkdball3") >= 1 then
if GetVariable("pkdball4") >= 1 then
if GetVariable("pkdball5") >= 1 then
if GetVariable("pkdball6") >= 1 then
if GetVariable("pkdball7") >= 1 then
Send ("ewish agility")
end
end
end
end
end
end
end
Just wondering how I can fix this issue. The ifchecks are for when I gather all the items and complete a "wish" for that option.
Run-time error
Plugin: dragonball_checker (called from world: Dragonball Evolution)
Immediate execution
[string "Trigger: "]:4: attempt to compare number with string
stack traceback:
[string "Trigger: "]:4: in main chunk
The coding I have is as follows:
pkdball1 = tonumber (GetVariable ("pkdball1")) or 0
pkdball1 = pkdball1 + 1
SetVariable ("pkdball1", pkdball1)
if GetVariable("pkdball1") >= 1 then
if GetVariable("pkdball2") >= 1 then
if GetVariable("pkdball3") >= 1 then
if GetVariable("pkdball4") >= 1 then
if GetVariable("pkdball5") >= 1 then
if GetVariable("pkdball6") >= 1 then
if GetVariable("pkdball7") >= 1 then
Send ("ewish agility")
end
end
end
end
end
end
end
Just wondering how I can fix this issue. The ifchecks are for when I gather all the items and complete a "wish" for that option.