Home Crush your enemies... and create an EMPIRE!!! Space Empires V -- BUY NOW!!!

User login

  • Create new account
  • Request new password

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • news aggregator

Search

Who's online

There are currently 1 user and 156 guests online.

Online users

  • bauscho

Languages

  • English English
  • French French

Browse archives

« December 2008  
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Home » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

SEV Scripting language

Submitted by CherryMoon on Fri, 2007-02-02 11:50. SE:V MODs

Well, I finally got the chance to actually do something with the scripting language today, and I must say it doesn't always seem to work like it should. I'm not blaming the SE V scripting language, but I feel that people need to know it's little quirks.

So far I discovered following things:
1) A function does NOT stop when it encounters a "return x". Programming languages like C/C++/Java stop their execution in that funcion and return to the place where they left when the funcion got called. So, do not make the same mistake as I, and assuming a return actually returns you to the calling place.

2) Every function seems to wants parameters. Although it'll compile a function that takes no parameters, it won't run good ingame in some cases (when I called "function(void)" in my setup script, I ended up with an empty sector, no planets, no sun, only the lines of the hexes). But, in kwoks scripts, I find functions that do not want parameters run good. I'm lost there ... Annyone knows why it won't take it in one case and will in the other?

Well, that's what I already found out. I assume there will be other things that don't work here as they would've worked in a mayor programming language. So, I suggest putting them here, so that others don't have to spend that time again to find what they did wrong. Perhaps we can make a "Do and Don't" list for on the SE V wiki, if the list get's big enough Smiling.

‹ Home System Marker Population production modifiers - Generating a smooth curve ›
» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Captain Kwok's picture
Mod Designer

Re: SEV Scripting language

Submitted by Captain Kwok on Fri, 2007-02-02 13:23.

Calling a function with no parameters is simply "Function()". To my knowledge it does return to the place where it was called - not sure what you're seeing.

Also check the docs directory for a proper listing of syntax etc in the Scripting reference.

-----

Space Empires Depot | SE:V Balance Mod

» login or register to post comments

Re: SEV Scripting language

Submitted by CherryMoon on Fri, 2007-02-02 13:40.

Captain Kwok wrote:
Calling a function with no parameters is simply "Function()". To my knowledge it does return to the place where it was called - not sure what you're seeing.

Also check the docs directory for a proper listing of syntax etc in the Scripting reference.

-----

Space Empires Depot | SE:V Balance Mod

Well, I did call function(), but it didn't changed a thing, I ended up in an empty sector, with nothing in it. Only changing it to function("string") and including a string variable in the parameter list solved it. I do not say this is the problem (ie: parameters), but by doing so, I somehow did something that solved the problem. Don't ask me what specifically, because I don't know. That's why I wrote it down here, I couldn't call a function with no parameters in the setup script, but you did in your main. So, I'm currious why it refuses to do so in my setup.

And about the thing of returning you to the place where it was called, I meant when it encounters a return. In normal programming languages, encountering a return does return you to the calling place, but in the SEV scripting, it just sets what is returnend. When the function ends, you get back to the same place. I only said it because some of us are used to use return to escape a called function/loop.

» login or register to post comments

Re: SEV Scripting language

Submitted by BlueM99n84 on Sat, 2007-02-03 07:26.

I had no problem with my function() call. I have not run into any issues with the return as you mentioned. My frustration is that some calls you need to make cannot be executed with the compiler...it requires the full program to be operating otherwise the various lists it depends upon are not available.

» login or register to post comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Now on STEAM

Now on STEAM!Space Empires V via STEAMSpace Empires IV via STEAMSTEAM online by Valve Corporation

Popular content

Today's:

  • Research By Percentage SUCKS
  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • What does Environmental Resistance do?
  • Space Empires V 1.74
  • OK Ship Mod

All time:

  • Space Empires V and VI: Expansions and the Future: Tell the Company What's on Your Wish List
  • Space Empires V
  • Gritty Galaxy Fleet Clash
  • Damn Dirty Bugs/Annoyances
  • Space Empires V: General Thoughts, Observations, and Suggestions

Last viewed:

  • Ships in fleet with extra movement pts
  • Map Compiler
  • 1.33 Bug: Can't fire on Ringed planets
  • imperial Civil War, perminate alliances
  • MP: Galactic Domination
(c) Strategy First, Inc. All rights reserved.