View Single Post
  #44  
Old 10-09-2007, 11:11 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness View Post
Stefan said himself that findimg() is creating a new image when one isn't found.
I'm fully aware of that.
Quote:
Originally Posted by Inverness
showimg() may be shorter but its not clearer to anyone new to GScript.
In my experience, people learning gscript find showimg() easier to understand than jumping straight into with (findimg()). That's because the other similar functions (findplayerbycommunityname, findnpc, findweapon, etc) do not instantiate anything when called. They expect the object to already exist.
Quote:
Originally Posted by Inverness
You're not serious are you? The functions are similar in the fact that they find objects however those objects are used in very different ways. findimg() creates an image when one isn't found for ease of use when manipulating indexed images.
I am not sure how they are used in different ways. All it is doing is providing an object to work with. In your example, it's taking the object and bringing it into the current scope to change a few variables. In my opinion, it should be assumed that the object already exists, because I believe that scripting languages should be semantically consistent.
__________________
Skyld
Reply With Quote