06.10.2014, 14:33
I need a script gift when the new players register write [/cadou] receive 3.000.000$ + Level 2
if(!strcmp(cmdtext, "/cadou", true))
{
new string4[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
strcat(string4, "Key activated: cadou\n");
strcat(string4, "\n");
strcat(string4, "In this key you will have:\n");
strcat(string4, "\n");
strcat(string4, "3000000$\n");
strcat(string4, "2 Level");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", string4, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}
Errors:
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(11) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(12) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(16) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(17) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "pName"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "string4"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
14 Errors.
if(!strcmp(cmdtext, "/cadou", true))
{
new string4[658], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
strcat(string4, "Key activated: cadou\n");
strcat(string4, "\n");
strcat(string4, "In this key you will have:\n");
strcat(string4, "\n");
strcat(string4, "3000000$\n");
strcat(string4, "2 Level");
ShowPlayerDialog(playerid, DIALOG_UPDATES, DIALOG_STYLE_MSGBOX, "Gift:", string4, "Okay", "");
PlayerInfo[playerid][pCash] += 3000000;
PlayerInfo[playerid][pLevel] += 2;
printf("Key activated: cadou");
printf("Player: %s", pName);
SetTimerEx("gKey", 3600, false, "i", playerid);
return 1;
}
Errors:
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(1) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(3) : error 017: undefined symbol "MAX_PLAYER_NAME"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(4) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(5) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(6) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(7) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn( : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(9) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : warning 219: local variable "string4" shadows a variable at a preceding level
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(10) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(11) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(12) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(15) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(16) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(17) : error 010: invalid function or declaration
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "pName"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : warning 203: symbol is never used: "string4"
C:\Documents and Settings\Andreiu\Desktop\moneybag\cadou.pwn(19) : error 013: no entry point (no public functions)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
14 Errors.