Quantcast

Jump to content

» «
Photo

Trying to add sound to script, can't compile it

7 replies to this topic
Stereotype
  • Stereotype

    Pwn

  • Members
  • Joined: 05 Jan 2014

#1

Posted 05 January 2014 - 05:36 PM Edited by Stereotype, 06 January 2014 - 11:26 AM.

I have problems when i try to compile thiss.. Invalid name in char

 

$PLAYER.DEFINED($PLAYER_CHAR)

 

 

{$CLEO .cs}
 
 
thread "$PLAYER.DEFINED($PLAYER_CHAR)" 
 
 
:$PLAYER.DEFINED($PLAYER_CHAR)_75
code goes on...

fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#2

Posted 05 January 2014 - 10:49 PM

thread "$PLAYER.DEFINED($PLAYER_CHAR)"
This opcode sets the of running script in game memory.
And this is also an opcode with special meaning to Sanny Builder decompiler - the string argument of this opcode will be read and used as a prefix for every next recognized label.
But Sanny Builder label names must conform to the following rule:
- character must be alphanumeric or equal to '_'

Unfortunately the decompiler doesn't check if script name from argument is a valid label name and sets the prefix for the following labels.

You have therefore invalid label names created by Sanny Builder and you need to change them into valid names.

Stereotype
  • Stereotype

    Pwn

  • Members
  • Joined: 05 Jan 2014

#3

Posted 06 January 2014 - 01:25 AM

thread "$PLAYER.DEFINED($PLAYER_CHAR)"

This opcode sets the of running script in game memory.
And this is also an opcode with special meaning to Sanny Builder decompiler - the string argument of this opcode will be read and used as a prefix for every next recognized label.
But Sanny Builder label names must conform to the following rule:
- character must be alphanumeric or equal to '_'

Unfortunately the decompiler doesn't check if script name from argument is a valid label name and sets the prefix for the following labels.

You have therefore invalid label names created by Sanny Builder and you need to change them into valid names.

 

Sorry, but i'm really new here.. Can you give me an example how to fix this

 


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#4

Posted 06 January 2014 - 10:57 AM

For example
:$PLAYER.DEFINED($PLAYER_CHAR)_75
This is invalid label name - label can't have a sign $ or ( or )

Make a this label valid by renaming it into valid name.
All references to label must be renamed accordingly.

Stereotype
  • Stereotype

    Pwn

  • Members
  • Joined: 05 Jan 2014

#5

Posted 06 January 2014 - 11:17 AM Edited by Stereotype, 06 January 2014 - 11:27 AM.

For example

:$PLAYER.DEFINED($PLAYER_CHAR)_75

This is invalid label name - label can't have a sign $ or ( or )

Make a this label valid by renaming it into valid name.
All references to label must be renamed accordingly.

 

But how it was compiled before?

 


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#6

Posted 06 January 2014 - 11:36 AM Edited by fastman92, 06 January 2014 - 11:36 AM.

An author of this CLEO script had valid labels, but he put invalid argument for script name:
thread "$PLAYER.DEFINED($PLAYER_CHAR)"
He did it possibly to prevent further compilation of decompiled script by inexperienced coders like you.

Stereotype
  • Stereotype

    Pwn

  • Members
  • Joined: 05 Jan 2014

#7

Posted 06 January 2014 - 11:38 AM

An author of this CLEO script had valid labels, but he put invalid argument for script name:

thread "$PLAYER.DEFINED($PLAYER_CHAR)"
He did it possibly to prevent further compilation of decompiled script by inexperienced coders like you.

 

 

 

So renaming "thread" will solve this?


fastman92
  • fastman92

    фастман92 | ف

  • Members
  • Joined: 28 Jul 2009
  • None

#8

Posted 06 January 2014 - 11:39 AM Edited by fastman92, 06 January 2014 - 11:40 AM.

thread "$PLAYER.DEFINED($PLAYER_CHAR)"
thread only affects decompilation of .cs file.

Assign valid names to existing labels.
All references to labels must be renamed accordingly.
  • Stereotype likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users