Aller au contenu

Photo

ERROR: NO FUNCTION STARTINGCONDITIONAL() IN SCRIPT


  • Veuillez vous connecter pour répondre
12 réponses à ce sujet

#1
Calgacus

Calgacus
  • Members
  • 122 messages
Why am I getting this error on a bunch of scripts I have not edited recently?
I edited some other scritps but not the ones giving that error.  Is there an external script compiler I should use to make debuging easier?

#2
Calgacus

Calgacus
  • Members
  • 122 messages
I found the bug causing it, my variable voff was spelled voffff. an extra f. But still there must be a better compiler, which is the best?

#3
Khuzadrepa

Khuzadrepa
  • Members
  • 188 messages
The PRC group did create an external compiler. Whether it's better or not is probably a personal preference. :)

You can find it here:

http://nwvault.ign.c...r.Detail&id=708

#4
Calgacus

Calgacus
  • Members
  • 122 messages
thanks

#5
Genisys

Genisys
  • Members
  • 525 messages
When you try to compile a normal script in the TextAppearsWhen box, by opening the script editor from the Edit button for that box, and you try to compile a normal script it will kick out this error, for the startingconditional() is much like void main() except it belongs in a conversations' TextAppearsWhen event, and it is not a normal script which uses void main().

#6
Calgacus

Calgacus
  • Members
  • 122 messages
I was getting the error when i built the module - in a bunch of scripts.

#7
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
you will also get errors for all include files when you build the module. They have no main viod or starting condition. as far as the build function is concerned it is a script so it trys to compile it. It was not meant to be compiled so the compiler kicks out an error. It is more of a problem with the build function then the compiler.



The build function is not that great on the feed back it gives. it does not take long to figure out what you can ingnore.



And no I don't thinker there is a replacement toolset out there. There are external compilers that i have never seen a reason to use. the internal one has never given me a problem.

#8
Khuzadrepa

Khuzadrepa
  • Members
  • 188 messages
I also prefer using the toolset compiler, as it hasn't given me any reason to look at another. :)

#9
Ed Venture

Ed Venture
  • Members
  • 102 messages
Hello everybody. I have been tinkering around for some time, trying to come up with a script that is a random starting conditional. The intended use is that an npc's response could be random rather than fixed. I've been using the d2 case scripts and having no success with the compiler. I've been getting around the problem by using d2 ActionStartConversation. The random script is just something I can't let go of. I wonder if it is even possible. Any help here would be appreciated.

#10
Ed Venture

Ed Venture
  • Members
  • 102 messages
I love the compiler. I realy do. If anyone is interested, I got it. It's funny how you can over complicate scripts. I was trying switch and case statements along with every thing else I could think of. Turns out, it was quite simple. Silly Noob.

int StartingConditional ()
{
int iResult = d2();
if(iResult > 1)
return FALSE;
return TRUE;
}
That's it. Only took me 3 months. Now what do I do with my life ? Ed

#11
Squatting Monk

Squatting Monk
  • Members
  • 444 messages
You can pare this down even more.

int StartingConditional()
{
    return (d2() == 1);
}

:P

Modifié par Squatting Monk, 07 février 2013 - 01:49 .


#12
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

Ed Venture wrote...

I love the compiler. I realy do. If anyone is interested, I got it. It's funny how you can over complicate scripts. I was trying switch and case statements along with every thing else I could think of. Turns out, it was quite simple. Silly Noob.

int StartingConditional ()
{
int iResult = d2();
if(iResult > 1)
return FALSE;
return TRUE;
}
That's it. Only took me 3 months. Now what do I do with my life ? Ed


You can simplify that to: 

 
int StartingConditional ()
{
return  d2()==1;
 }

EDIT:  lol beat to the punch

Modifié par Lightfoot8, 07 février 2013 - 01:59 .


#13
Failed.Bard

Failed.Bard
  • Members
  • 774 messages
or:
int StartingConditional ()
{
return Random(2);
}