Log in

View Full Version : Wrong PAWN or what?



frankpetrov
09-22-2011, 09:07 PM
Ok, so i went to the compuphase's site and downloaded and installed PAWN. Program on computer is called PAWN IDE (Quincy). I put the included files into the installed folder for PAWN so I could compile the scripts.

First errors i get refer to these:



public OnActorAlert(actor, Bool:alerted)
{
printf("alert: %d", alerted);
}

public OnActorSneak(actor, Bool:sneaking)
{
printf("sneaking: %d", sneaking);
}

and the errors are "warning 213: tag mismatch"


I comment those out and everything compiles correctly.
I set up my vaultserver.ini like so:


# vaultserver configuration file
# www.vaultmp.com

[general]
name=Testing server
game=newvegas ;can be "fallout3", "newvegas", or "oblivion"
master=vaultmp.com ;master server address, default is: vaultmp.com (can have the format IP:port)
port=27015 ;the port to run the server on, default is: 1770 (UDP for game, TCP for fileserve)
query=1 ;enable direct query, default is: 1
players=4 ;number of player slots, default is: 4
save=Fallout3/default.fos ;savegame for the players to load (need to be located in the folder "saves")
fileserve=1 ;allow users to download required files (such as mods) from the server, default is: 0
fileslots=8 ;maximum number of parallel fileserve connnections, default is: 8

[scripts]
;comma seperated list of PAWN / C++ scripts, will be loaded in the given order
;scripts need to be located in the root
scripts=test1.amx

[mods]
;comma seperated list of mod files required to play on this server
;mods need to be located in the folder "mods", which is the games "Data" folder clientside
;mods will be loaded in the given order
;mods=mymod.esp

and start the server and get this error:


Pawn script test1.amx error <17>: "Invalid/unsupported P-code file format"
/code]
Yet it still connects to the MasterServer, but doesn't set anything that's set in the script. (btw, im using standard.pwn that comes with the vaultmp files)

Here's this:
[code]
main()
{
printf("My first PAWN vaultscript <3\n");
SetServerName("vaultmp 0.1a server");
SetServerRule("website", "vaultmp.com");

switch (GetGameCode())
{ //<<<<<<<--------------- thats line 17 in the script
case FALLOUT3:
SetServerMap("the wasteland");
case NEWVEGAS:
SetServerMap("mojave desert");
case OBLIVION:
SetServerMap("cyrodiil");
}

//CreateTimer("MyTimer", 5000);
}


Any know fixes yet?

Thanks in advance!

foxtacles
09-22-2011, 09:17 PM
You need to compile with -C64 (64bit cell size) command line switch, e.g.

pawncc.exe standard.pwn -C64

I put a "compile.bat" file for this purpose in the vaultmp package, but you should be able to somehow enable -C64 in your IDE too.


and the errors are "warning 213: tag mismatch"

That's due to the Bool type of the arguments. Honestly, I don't have a clue how you can "cast" this away in PAWN. You can safely ignore these warnings (in this case), though ;)

frankpetrov
09-22-2011, 10:32 PM
You need to compile with -C64 (64bit cell size) command line switch, e.g.

pawncc.exe standard.pwn -C64

I put a "compile.bat" file for this purpose in the vaultmp package...


I tried using this .bat but it isn't compiling anything. I put the .pwn in the same folder as it (vaultscript/pawn/standard.pwn) and in the .bat replaced the %1 with standard.pwn and all that happens is the cmd box flashes and doesn't compile it.

foxtacles
09-22-2011, 10:35 PM
It's working fine for me. A <filename>.amx should appear in that folder. Try running the .bat in a command line (cmd.exe) and post the errors you get ;)

frankpetrov
09-22-2011, 10:36 PM
Never mind. I got it to compile. I had the original .amx in there so i didn't notice it was compiled. Not throwing that error at me in the server either. Thanks!

edit: also, is there a wiki page of all the PAWN functions and their usage yet?

Lorenc
09-24-2011, 07:35 AM
yes there is, I would request a sticky on the other note but, never mind that. If you need help ask me, I have some knowledge of PAWN , I'll write up some more soon.

NeoPhoenix
10-01-2011, 05:31 AM
First errors i get refer to these:



public OnActorAlert(actor, Bool:alerted)
{
printf("alert: %d", alerted);
}
public OnActorSneak(actor, Bool:sneaking)
{
printf("sneaking: %d", sneaking);
}

and the errors are "warning 213: tag mismatch"

What, you got an error at the printf´s? Should be impossible