Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Looking for water
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:26
  Old Post 14-03-2003 15:51
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Looking for water Remove this text

Has anyone had any luck with either of these functions:

quote:


INT GetNearestWater (fromLocation, toLocation)

Return the nearest water square to fromLocation in toLocation
-------------------

INT FindCoastalCity(player, cityvar)

Find a city next to the ocean and put it in cityvar. Returns 0 if no coastal cities are found.



I keep getting 'wrong type of argument' errors

Martin Gühmann is offline Martin Gühmann
Emperor
Berlin, Germany
Mar 2001
time: 06:26
Post  Old Post 14-03-2003 23:11 Visit Martin Gühmann's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

Unfortunatyl I never tried them, that is I found in Locutus' version of the SLIC1 documentaion:

quote:

INT GetNearestWater(location, locationvar)
Get the location of the nearest ocean square to location, putting the result in locationvar. Also returns the distance in patched version.

INT FindCoastalCity(player, cityvar)
Find a city next to the ocean and put it in cityvar. Returns 0 if no coastal cities are found.


Probably you already got what they mean. So my solution would be brute force, the Trial and Error method of testing all possible variable types. Fortunatly we only have location_t, army_t, city_t, int_t and unit_t if I did not forgot anyone. But actual stupid to give the first function a unit_t as argument.

For the second function I could give you an explanation or at least an idea, in the SLIC2 documentaion you find this:

player.owner - An integer version of the player.

That means there is a difference between integers and players, the only problem is that in most situation players and ints should be interchangable. But if you use DebugSlic=Yes you figure out that you should care attention if you are using ints or players.

-Martin

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:26
  Old Post 14-03-2003 23:42 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton buy from Amazon

I'm pretty sure I've had both functions working, but that may have been in CtP1...

Will check my notes and do some testing if I have time tonight.

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:26.
Apolyton Time is 00:26.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0372 seconds (84.69% PHP - 15.31% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net