Code: Select all
use os;
use uo;
include "include/attributes";
program seed(who, item)
var x := who.x;
var y := who.y;
var z := who.z;
var parms := {};
parms[1] := who;
parms[2] := "0x12";
if(start_script("seedling", parms))
var parms1 := {};
parms1[1] := who;
parms1[2] := "0x10";
if(start_script("seedling", parms))
SendSysMessage(who, "Success");
endif
else
SendSysMessage(who, "Failure");
exit;
endif
SubtractAmount(item, 1);
endprogram
and the seedling script:
Code: Select all
use os;
use uo;
program seedling(parms)
var where := parms[1];
var what := parms[2];
var x:= where.x;
var y:= where.y;
var z:= where.z;
sleep(600);
CreateItemAtLocation(x, y, z, what, 1);
endprogram
Now for some reason, when the script is called(the first script) it just says failure which should indicate something is wrong with how I have my Start_Script set up, anything look wrong to you guys?
The debug.txt says:
Script Error in 'scripts/items/seed.ecl' PC=70:
Call to function SendSysMessage:
Parameter 1: Expected datatype String, got datatype Error