Help With Simple Deathmatch Script
#1

when i try to compile this script:
Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
	print("\n-----------------------------------------");
	print(" Call Of Duty SA-MP Los Santos DeathMatch");
	print("-------------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        return 1;
    }
return 0;
}

public loadobjects()
{
CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
return 1;
}
i got these errors and warnings:
Code:
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help me
Reply
#2

Quote:
Originally Posted by [BD]SHANU[NR]
View Post
when i try to compile this script:
Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
	print("\n-----------------------------------------");
	print(" Call Of Duty SA-MP Los Santos DeathMatch");
	print("-------------------------------------------\n");
	return 1;
}

public OnFilterScriptExit()
{
	return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        return 1;
    }
return 0;
}

public loadobjects()
{
CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
return 1;
}
i got these errors and warnings:
Code:
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\UIFAdminHouse.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
please help me
Try this


Code:
public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
     CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
     CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
     CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
     return 1;
}
Use tab to give a large space.
Reply
#3

You are missing a bracket.

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/lsdm", cmdtext, true, 10) == 0)
{
if(IsPlayerAdmin(playerid))
{
SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
}
return 1;
}
return 0;
}

Reply
#4

Same /\
Reply
#5

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355,-69.0078,.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}
Reply
#6

not working man i still getting errors
Code:
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 001: expected token: "-identifier-", but found "-integer value-"
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : warning 215: expression has no effect
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 001: expected token: ";", but found ")"
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : error 029: invalid expression, assumed zero
C:\Users\time\Documents\AdminHouse\New folder\LSDM.pwn(26) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Reply
#7

Post line 26
Reply
#8

what do u mean man
Reply
#9

line 26 is SetPlayerPos but i see the problem he has SetPlayerPos(playerid, X, Y); add the last section so like i wanted to tp to the center of SA i would put: SetPlayerPos(playerid, 0, 0, 0); not SetPlayerPos(playerid, 0, 0);
Reply
#10

like CreateObject is CreateObject(objectid, X, Y, Z, RX, RY, RZ); u need to add the last number to SetPlayerPos
Reply
#11

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355,-69.0078);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}
Reply
#12

like this :
Code:
SetPlayerPos(playerid,2037.0355,69.0078,91.4494,0,0,0,0,0,0);
i try'd it its not working
Reply
#13

no like this:
Code:
SetPlayerPos(playerid,2037.0355,69.0078,91.4494);
Reply
#14

Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

forward loadobjects();

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355, -69.0078, 91.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }

    return 0;
}

public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}
fixed for ya that works fine
Reply
#15

pawn Code:
#include <a_samp>

#define FILTERSCRIPT

#define messagecolor 0x99FF9900
#define red 0xFF0000AA

public OnFilterScriptInit()
{
    print("\n-----------------------------------------");
    print(" Call Of Duty SA-MP Los Santos DeathMatch");
    print("-------------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/lsdm", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            SetPlayerPos(playerid,2037.0355, -69.0078, 91.4494);
            SendClientMessage(playerid,0x00FF00FF,"You have been teleported");
        }
        return 1;
    }
   
    return 0;
}

forward loadobjects();
public loadobjects()
{
    CreateObject(3092, 1235.0999755859, -2042, 61, 0, 0, 0);
    CreateObject(1437, 1123.3000488281, -2033.5999755859, 68.900001525879, 0, 0, 0);
    CreateObject(13011, 1124.5, -2038.3000488281, 70.599998474121, 0, 0, 0);
    CreateObject(12987, 1125.1999511719, -2037.5999755859, 72.699996948242, 0, 0, 0);
    CreateObject(1559, 1122.4000244141, -2036.5999755859, 69.900001525879, 0, 0, 0);
    CreateObject(1225, 1175.6999511719, -2038.8000488281, 68.5, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2034.9000244141, 68.5, 0, 0, 0);
    CreateObject(1225, 1174.9000244141, -2035, 69.300003051758, 0, 0, 0);
    CreateObject(1225, 1175.3000488281, -2038.9000244141, 69.5, 0, 0, 0);
    CreateObject(3267, 1172.3000488281, -2037, 68, 0, 0, 0);
    CreateObject(3515, 1162.1999511719, -2044.9000244141, 70, 0, 0, 0);
    CreateObject(3524, 1163.5999755859, -2032.8000488281, 70.900001525879, 0, 0, 0);
    CreateObject(3524, 1186.5999755859, -2041.1999511719, 70.900001525879, 0, 0, 0);
    CreateObject(7388, 1186.9000244141, -2030.8000488281, 68, 0, 0, 0);
    CreateObject(3515, 1174.3000488281, -2006.5999755859, 70, 0, 0, 0);
    CreateObject(9833, 1174.1999511719, -2068.3000488281, 71.199996948242, 0, 0, 0);
    CreateObject(7073, 1095.9000244141, -2036.1999511719, 99.900001525879, 0, 0, 0);
    CreateObject(1242, 1183, -2072.8999023438, 68.199996948242, 0, 0, 0);
    return 1;
}
Reply
#16

i fixed it already king it needed the extra 91.4494 on SetPlayerPos and loadobjects() needed to be forwarded
Reply
#17

Quote:
Originally Posted by Zonoya
View Post
i fixed it already king it needed the extra 91.4494 on SetPlayerPos and loadobjects() needed to be forwarded
No need to say that to me. Also there is no reason to double post everytime. Just edit it.
Reply
#18

sorry didn't mean for that to happen
Reply
#19

ohh sry my coords are 1203.6621,-2037.0355,69.0078,91.4494,0,0,0,0,0,0
man it works but it didnt tele me to my place
please help
Reply
#20

sry for double post it didnt tele me to my place please help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)