DEBUG

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 097.
Note: Core 097 is no longer officially supported.
Post Reply
Tio Bugger
New User
Posts: 7
Joined: Mon Sep 08, 2008 7:32 am

DEBUG

Post by Tio Bugger »

Hello friends,

I'm having some problems with my DEBUG, correct some mistakes, but they do not understand what I was wrong, they can give me some tips?

POL 097

Script Error in 'scripts/ai/archerkillpcs.ecl' PC=2530:
Call to function CreateItemInContainer:
Parameter 1: Expected Long, String, or Struct, got datatype Uninit

Script Error in 'scripts/ai/merchant.ecl' PC=1723:
Call to function GetConfigString:
Parameter 0: Expected datatype ApplicObj, got datatype Error


Can you help?
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Re: DEBUG

Post by Austin »

These are coming from debug.log correct?

They occur when data is not checked.
When you call a core function, you should always try to determine if the return value is an error before proceeding.

Code: Select all

Script Error in 'scripts/ai/merchant.ecl' PC=1723:
Call to function GetConfigString:
Parameter 0: Expected datatype ApplicObj, got datatype Error
You used GetConfigString() and the ConfigElem reference that should be passed was an error data type.
http://docs.polserver.com/pol097/objref.php#Error

For

Code: Select all

Script Error in 'scripts/ai/archerkillpcs.ecl' PC=2530:
Call to function CreateItemInContainer:
Parameter 1: Expected Long, String, or Struct, got datatype Uninit
CreateItemInContainer( container, objtype, amount := 1 )

Parameter 1 is getting a variable that has never been assigned a value in your script.
Post Reply