4 compile errors
#1

Hey all, first of all i have to say that this forum REALLY needs a "View my topics" button somewhere.. because ive lost track of all my topics/threads lol, so ill make a new one..

How to fix these errors?

Код:
C:\Documents and Settings\Administratцr\Skrivbord\SAMP server\gamemodes\new.pwn(95) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\Administratцr\Skrivbord\SAMP server\gamemodes\new.pwn(95) : error 017: undefined symbol "Help"
C:\Documents and Settings\Administratцr\Skrivbord\SAMP server\gamemodes\new.pwn(95 -- 96) : error 017: undefined symbol "First"
C:\Documents and Settings\Administratцr\Skrivbord\SAMP server\gamemodes\new.pwn(95 -- 96) : fatal error 107: too many error messages on one line

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


4 Errors.
I got the errors when compiling after i added these /help and /rules commands >.>..

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
        SendClientMessage(playerid, red, "~~~Help~~~
First Of All Read The Rules!
Do So By Typing /Rules In The Chat Window

/Teles To See All Of The Teleports.
/Cars To Open The Vehicle Menu.
/Anims To See More About Animations.
/Cmds To See More About our Commands.
/Website If You Would Like To Visit Our Forums.

If You Would Like To Talk More Private
You Can PM Your Friends With /PM Followed By Their ID or Nickname. ");
		return 1;
	}
	return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/rules", cmdtext, true, 10) == 0)
	{
        SendClientMessage(playerid, red, " ~~Rules~~
Never beg to be an admin! If you would like to be an admin sign up at forums
Never steal other peoples cars! (Not their wifes either hihi !)
NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann

And remember, be nice to people and they will be nice to you! ");
		return 1;
	}
	return 0;
}
Reply
#2

You cant just write a string over more than one line. Split it up and make multiple SendCcientMessage s

SendClientMessage(playerid, red, "~~~Help~~~");
SendClientMessage(playerid, red, "First Of All Read The Rules!");
...
Reply
#3

So i have to do SendClientMessage before every line of words ? o. o can you pleaasee fix it for me?
Reply
#4

Quote:
Originally Posted by Kitten_Blind
Посмотреть сообщение
So i have to do SendClientMessage before every line of words ? o. o can you pleaasee fix it for me?
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, "~~~Help~~~ ");
        SendClientMessage(playerid, red, "First Of All Read The Rules! ");
        SendClientMessage(playerid, red, "Do So By Typing /Rules In The Chat Window ");
        SendClientMessage(playerid, red, "/Teles To See All Of The Teleports. ");
        SendClientMessage(playerid, red, "/Cars To Open The Vehicle Menu. ");
        SendClientMessage(playerid, red, "/Anims To See More About Animations. ");
        SendClientMessage(playerid, red, "/Cmds To See More About our Commands. ");
        SendClientMessage(playerid, red, "/Website If You Would Like To Visit Our Forums. ");
        SendClientMessage(playerid, red, "If You Would Like To Talk More Private ");
        SendClientMessage(playerid, red, "You Can PM Your Friends With /PM Followed By Their ID or Nickname. ");
        return 1;
    }
    return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, " ~~Rules~~");
        SendClientMessage(playerid, red, "Never beg to be an admin! If you would like to be an admin sign up at forums");
        SendClientMessage(playerid, red, "Never steal other peoples cars! (Not their wifes either hihi !)");
        SendClientMessage(playerid, red, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann");
        SendClientMessage(playerid, red, "And remember, be nice to people and they will be nice to you! ");
        return 1;
    }
    return 0;
}
Reply
#5

Thank you so much! I love you

EDIT, aww still one error

Код:
C:\Documents and Settings\Administratцr\Skrivbord\SAMP server\Mah serva.pwn(111) : error 021: symbol already defined: "OnPlayerCommandText"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#6

Quote:
Originally Posted by Kitten_Blind
Посмотреть сообщение
Thank you so much! I love you
Reply
#7

This thread has definitely tickled me LOL.
Reply
#8

xd ty.. i know im a total noob at scripting lol >.>.. but look a bit up, still one error :S
Reply
#9

Quote:
Originally Posted by Kitten_Blind
Посмотреть сообщение
xd ty.. i know im a total noob at scripting lol >.>.. but look a bit up, still one error :S
Why all noobs like you only copy and paste instead of reading and/or trying to figure it out by your self?
Reply
#10

Muddler: Hi, And I have, i looked at it for around 15 minutes, and showed to my scripter (Who said it was 100% correct lol -.- he sucks).. but cant figure out whats wrong : s ive even watched a newbie guide for scripters but still cant see whats wrong.. so instead of doing your totaly pointless replys, can you please help me?

Austin: What? yes one for each command? i tried remove it from one but that made it all fucked up o. o
Reply
#11

.....
Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, "~~~Help~~~ ");
        SendClientMessage(playerid, red, "First Of All Read The Rules! ");
        SendClientMessage(playerid, red, "Do So By Typing /Rules In The Chat Window ");
        SendClientMessage(playerid, red, "/Teles To See All Of The Teleports. ");
        SendClientMessage(playerid, red, "/Cars To Open The Vehicle Menu. ");
        SendClientMessage(playerid, red, "/Anims To See More About Animations. ");
        SendClientMessage(playerid, red, "/Cmds To See More About our Commands. ");
        SendClientMessage(playerid, red, "/Website If You Would Like To Visit Our Forums. ");
        SendClientMessage(playerid, red, "If You Would Like To Talk More Private ");
        SendClientMessage(playerid, red, "You Can PM Your Friends With /PM Followed By Their ID or Nickname. ");
        return 1;
    }
    return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, " ~~Rules~~");
        SendClientMessage(playerid, red, "Never beg to be an admin! If you would like to be an admin sign up at forums");
        SendClientMessage(playerid, red, "Never steal other peoples cars! (Not their wifes either hihi !)");
        SendClientMessage(playerid, red, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann");
        SendClientMessage(playerid, red, "And remember, be nice to people and they will be nice to you! ");
        return 1;
    }
    return 0;
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, "~~~Help~~~ ");
        SendClientMessage(playerid, red, "First Of All Read The Rules! ");
        SendClientMessage(playerid, red, "Do So By Typing /Rules In The Chat Window ");
        SendClientMessage(playerid, red, "/Teles To See All Of The Teleports. ");
        SendClientMessage(playerid, red, "/Cars To Open The Vehicle Menu. ");
        SendClientMessage(playerid, red, "/Anims To See More About Animations. ");
        SendClientMessage(playerid, red, "/Cmds To See More About our Commands. ");
        SendClientMessage(playerid, red, "/Website If You Would Like To Visit Our Forums. ");
        SendClientMessage(playerid, red, "If You Would Like To Talk More Private ");
        SendClientMessage(playerid, red, "You Can PM Your Friends With /PM Followed By Their ID or Nickname. ");
        return 1;
    }
    return 0;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, " ~~Rules~~");
        SendClientMessage(playerid, red, "Never beg to be an admin! If you would like to be an admin sign up at forums");
        SendClientMessage(playerid, red, "Never steal other peoples cars! (Not their wifes either hihi !)");
        SendClientMessage(playerid, red, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann");
        SendClientMessage(playerid, red, "And remember, be nice to people and they will be nice to you! ");
        return 1;
    }
       /*if (strcmp("/anothercommand", cmdtext, true, 10) == 0) // remove the /* in front of if and replace: anothercommand with the command you have. Remove the OnPlayerCommandText you have for that command and add the script using "{" and "}"  than it should compile fine :)*/
    return 0;
}
Reply
#12

Selten: I dont have any "*" infront of "if" ? And im sorry i dont understand, should i make it like this without onplayercommandtext? o. o

Код:
if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, " ~~Rules~~");
        SendClientMessage(playerid, red, "Never beg to be an admin! If you would like to be an admin sign up at forums");
        SendClientMessage(playerid, red, "Never steal other peoples cars! (Not their wifes either hihi !)");
        SendClientMessage(playerid, red, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann");
        SendClientMessage(playerid, red, "And remember, be nice to people and they will be nice to you! ");
        return 1;
    }
       /*if (strcmp("/anothercommand", cmdtext, true, 10) == 0) // remove the /* in front of if and replace: anothercommand with the command you have. Remove the OnPlayerCommandText you have for that command and add the script using "{" and "}"  than it should compile fine :)*/
    return 0;
}
Reply
#13

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/help", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, "~~~Help~~~ ");
        SendClientMessage(playerid, red, "First Of All Read The Rules! ");
        SendClientMessage(playerid, red, "Do So By Typing /Rules In The Chat Window ");
        SendClientMessage(playerid, red, "/Teles To See All Of The Teleports. ");
        SendClientMessage(playerid, red, "/Cars To Open The Vehicle Menu. ");
        SendClientMessage(playerid, red, "/Anims To See More About Animations. ");
        SendClientMessage(playerid, red, "/Cmds To See More About our Commands. ");
        SendClientMessage(playerid, red, "/Website If You Would Like To Visit Our Forums. ");
        SendClientMessage(playerid, red, "If You Would Like To Talk More Private ");
        SendClientMessage(playerid, red, "You Can PM Your Friends With /PM Followed By Their ID or Nickname. ");
        return 1;
    }

    if (strcmp("/rules", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, red, " ~~Rules~~");
        SendClientMessage(playerid, red, "Never beg to be an admin! If you would like to be an admin sign up at forums");
        SendClientMessage(playerid, red, "Never steal other peoples cars! (Not their wifes either hihi !)");
        SendClientMessage(playerid, red, "NEVER deathmatch outside of deathmatch ares, it WILL lead to an kick/bann");
        SendClientMessage(playerid, red, "And remember, be nice to people and they will be nice to you! ");
        return 1;
    }
       /*if (strcmp("/anothercommand", cmdtext, true, 10) == 0) // remove the /* in front of if and replace: anothercommand with the command you have. Remove the OnPlayerCommandText you have for that command and add the script using "{" and "}"  than it should compile fine :)*/
    return 0;
}
Reply
#14

Ohhh, thank you! thank to you all! now i know how to make simple commands
Reply
#15

FUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUDGE!!!!!

Now samp-server auto closes and i get this error. EDIT NVM fixed it, was because it was a space in gamemode name.. xP

Код:
SA-MP Server: 0.3b R2



Exception At Address: 0x004A233B



Registers:

EAX: 0x0012FDB4	EBX: 0x029413AC	ECX: 0x00000000	EDX: 0x00405910

ESI: 0x00000000	EDI: 0x00FC6888	EBP: 0x0012FDC4	ESP: 0x0012FD9C

EFLAGS: 0x00010286



Stack:

+0000: 0x00FC6888   0x00FC6888   0x029413AC   0xFFFFFFFF

+0010: 0x0012FD9C   0x0012F9C0   0x0012FEDC   0x004A5FA4

+0020: 0x004C11C8   0xFFFFFFFF   0x029B8280   0x0040591D

+0030: 0x00000000   0x00401096   0x00FC6888   0x02AFEC88

+0040: 0x029BBF80   0x00402BB3   0x00FC6888   0x0000000B

+0050: 0x0012FE04   0x02AFEC88   0x7C802446   0x00F8F328

+0060: 0x00000006   0x00F8F328   0x00000064   0x00142D0C

+0070: 0x00142D08   0x0014312C   0x000B57DC   0x00143114

+0080: 0x000B57DC   0x029413AC   0x029BBF80   0x00000000

+0090: 0x02940020   0x0007ABD4   0x00484865   0x00FC6888

+00A0: 0x0012FE50   0x0000001B   0x00F8F328   0x00000006

+00B0: 0x00485FC4   0x0000001B   0x00000000   0x00AA7A28

+00C0: 0x0049966C   0x7C802530   0x00AA7A28   0x00000000

+00D0: 0x00497BAB   0x00000000   0x00000A28   0x0012FFC0

+00E0: 0x7FFDA000   0x00012BA3   0x00010101   0x00000032

+00F0: 0x00001E61   0x00000070   0x00000AB8   0x00AA7A28

+0100: 0x656D6167   0x65646F6D   0x00003531   0x004CA014

+0110: 0x004CA010   0x7FFDA000   0x004B4220   0x0012FEA8

+0120: 0x0012FEA4   0x0012FFB0   0x004A5FA4   0x004C1308

+0130: 0xFFFFFFFF   0x004A4441   0x004A4451   0x004B4220
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)