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

Connexion utilisateur

  • Créer un nouveau compte
  • Demander un nouveau mot de passe

Navigation

  • news
    • archive
    • blogs
    • books
    • forums
    • recent posts
    • groups
  • image galleries
  • projects & downloads
  • search
  • create content
  • agrégateur de nouvelles

Rechercher

Qui est en ligne

Il y a actuellement 3 utilisateurs et 157 invités en ligne.

Utilisateurs en ligne

  • GambitUK
  • Shrike
  • Randallw

Languages

  • English English
  • French French

Parcourir les archives

« August 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
Accueil » news » forums » Support & Feedback » Scenarios & Mods » SE:V MODs

SEV Scripting language

Soumis par CherryMoon le Ven, 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 ›
» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.
Image de Captain Kwok
Mod Designer

Re: SEV Scripting language

Soumis par Captain Kwok le Ven, 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

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: SEV Scripting language

Soumis par CherryMoon le Ven, 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.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Re: SEV Scripting language

Soumis par BlueM99n84 le Sam, 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.

» Vous devez vous identifier ou créer un compte pour écrire des commentaires

Options d'affichage des commentaires

Sélectionnez la méthode d'affichage des commentaires que vous préférez, puis cliquez sur "Sauvegarder les paramètres" pour activer vos changements.

Now on STEAM

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

Contenu populaire

Aujourd'hui :

  • Bigger Map as in Bigger :)
  • Known SE5 v1.74 Bugs
  • Wepons Mod
  • Space Empires V 1.74
  • Editing max systems in settings.txt

Depuis toujours :

  • 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

Dernier accès :

  • Error in "SystemTypes.txt"
  • Using hotkey 'n' for ship rename now causes annoyance
  • When Newbies Attack - PBW game with some slots to fill
  • supply production during combat? possible?
  • Evilhamburger's EvilMod 1.0.0-Main Release
(c) Strategy First, Inc. All rights reserved.