SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/09/2017, 11:40 AM   #1
CXdur
Big Clucker
 
CXdur's Avatar
 
Join Date: Jun 2014
Location: Norway
Posts: 57
Reputation: 6
Default Building using windows powershell

Hey,

I struggle to build using windows powershell. Does anyone here have any idea?

Code:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

At line:1 char:66
+ ... sers\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 ...
+                                                                  ~
Missing expression after unary operator '+'.
At line:1 char:68
+ ... rs\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 - ...
+                                                                  ~
You must provide a value expression following the '=' operator.
At line:1 char:68
+ ... s\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -i ...
+                                                                 ~
Unexpected token ')' in expression or statement.
At line:1 char:70
+ ... \sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic ...
+                                                                  ~
Missing expression after unary operator '+'.
At line:1 char:71
+ ... ndr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\U ...
+                                                                ~~
Unexpected token '-v' in expression or statement.
At line:1 char:73
+ ... dr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Us ...
+                                                                 ~
Unexpected token '2' in expression or statement.
At line:1 char:75
+ ... it\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\ ...
+                                                               ~~~
Unexpected token '-ic' in expression or statement.
At line:1 char:78
+ ... emodes/lsrcr.pwn -;+ =)+ -v2 -ic:\Users\sondr\git\lsrcr/pawno/include
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I understand there might be an error there, the arguments above is just what I've tried after hours of trying to make this work.

This is what I've normally tried to use:

Code:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Missing closing ')' in expression.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndParenthesisInExpression

The terminal process terminated with exit code: 1
Does anyone understand why I get this error? I am trying to build via power shell using VScode.

This last part is something I've tried doing through powershell to see if the arguments are even listed up, and they are.

Code:
PS C:\Users\sondr\git\lsrcr> pawno\pawncc gamemodes\lsrcr.pwn -; -v2
>>
Pawn compiler 3.10.20160907                     Copyright (c) 1997-2006, ITB CompuPhase

Usage:   pawncc <filename> [filename...] [options]

Options:
         -A<num>  alignment in bytes of the data segment and the stack
         -a       output assembler code
         -C[+/-]  compact encoding for output file (default=+)
         -c<name> codepage name or number; e.g. 1252 for Windows Latin-1
         -Dpath   active directory path
         -d<num>  debugging level (default=-d1)
             0    no symbolic information, no run-time checks
             1    run-time checks, no symbolic information
             2    full debug information and dynamic checking
             3    same as -d2, but implies -O0
         -e<name> set name of error file (quiet compile)
         -H<hwnd> window handle to send a notification message on finish
         -i<name> path for include files
         -l       create list file (preprocess only)
         -o<name> set base name of (P-code) output file
         -O<num>  optimization level (default=-O1)
             0    no optimization
             1    JIT-compatible optimizations only
             2    full optimizations
         -p<name> set name of "prefix" file
         -r[name] write cross reference report to console or to specified file
         -S<num>  stack/heap size in cells (default=4096)
         -s<num>  skip lines from the input file
         -t<num>  TAB indent size (in character positions, default=8)
         -v<num>  verbosity level; 0=quiet, 1=normal, 2=verbose (default=1)
         -w<num>  disable a specific warning by its number
         -X<num>  abstract machine size limit in bytes
         -XD<num> abstract machine data/stack size limit in bytes
         -Z[+/-]  run in compatibility mode (default=+)
         -\       use '\' for escape characters
         -^       use '^' for escape characters
         -;[+/-]  require a semicolon to end each statement (default=-)
         -([+/-]  require parantheses for function invocation (default=-)
         sym=val  define constant "sym" with value "val"
         sym=     define constant "sym" with value 0

Options may start with a dash or a slash; the options "-d0" and "/d0" are
equivalent.

Options with a value may optionally separate the value from the option letter
with a colon (":") or an equal sign ("="). That is, the options "-d0", "-d=0"
and "-d:0" are all equivalent.
-v2 : The term '-v2' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the s
pelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:37
+ pawno\pawncc gamemodes\lsrcr.pwn -; -v2
+                                     ~~~
    + CategoryInfo          : ObjectNotFound: (-v2:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException
This is all very confusing to me. I am using Zeex's compiler by the way. I hope anyone here has an idea.
CXdur is offline   Reply With Quote
Old 19/09/2017, 11:53 AM   #2
CXdur
Big Clucker
 
CXdur's Avatar
 
Join Date: Jun 2014
Location: Norway
Posts: 57
Reputation: 6
Default Re: Building using windows powershell

I would like to add that if I use cmd or the type "process" when building in VScode it struggles to read from my modular files. The directory is fine because it compiles perfectly in atom with the following build code:

Code:
module.exports = {
  cmd: '{PROJECT_PATH}/pawno/pawncc',
  name: 'build',
  args: ['{FILE_ACTIVE}', '-;', '-(', '-v2', '-d2', '-i{PROJECT_PATH}/pawno/include'],
  sh: false,
  cwd: '{FILE_ACTIVE_PATH}',
  errorMatch: [
    '(?<file>[a-zA-Z0-9\\/\\\\:_\\.-]+)\\((?<line>[0-9]+)\\)\\s:\\s(?<message>.*)',
  ],
};
This is the current build command and error I'm getting with cmd:

Code:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Pawn compiler 3.10.20160907                     Copyright (c) 1997-2006, ITB CompuPhase

gamemodes/lsrcr.pwn(23) : fatal error 100: cannot read from file: "global/definitions.pwn"

Compilation aborted.
CXdur is offline   Reply With Quote
Old 19/09/2017, 05:27 PM   #3
CXdur
Big Clucker
 
CXdur's Avatar
 
Join Date: Jun 2014
Location: Norway
Posts: 57
Reputation: 6
Default Re: Building using windows powershell

For anyone who has the same issue trying to build using VScode, please note the path here:

> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe gamemodes/lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

I used ${relativeFile} rather than ${file}.

By using file, I get the full directory like this:
> Executing task: c:\Users\sondr\git\lsrcr/pawno/pawncc.exe c:\Users\sondr\git\lsrcr\gamemodes\lsrcr.pwn -; -( -v2 -ic:\Users\sondr\git\lsrcr/pawno/include <

Which seems to solve the problem.
CXdur is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Button + Start Menu Problem (Windows 10) K0P Everything and Nothing 2 25/07/2016 11:07 PM
How do i downgrade from Windows 8 pro to windows 7 ultimate? Ritzy2K Everything and Nothing 20 09/11/2015 08:52 AM
Windows XP SAMP 0.3c Installation, Windows system plugin: d3dx9_25? Sasino97 Client Support 8 09/07/2011 05:03 PM
The application or FLL C:\WINDOWS\system\MSVCR70.dll is not a valid windows img. Retarded Monkey Client Support 1 08/12/2009 12:24 PM


All times are GMT. The time now is 03:26 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.