PDA

View Full Version : [Help]4 Errors, Warn command.


vannesenn
18/01/2012, 01:03 PM
I need help from the best workers in pawn. We have 4 Erors the CLRP scripts. The command is warn. Thanks for your help.
Errors:
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : warning 219: local variable "Index" shadows a variable at a preceding level
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : error 012: invalid function call, not a valid address
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : warning 215: expression has no effect
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : warning 215: expression has no effect
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : error 001: expected token: ";", but found ")"
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : error 029: invalid expression, assumed zero
C:\Users\Silvio\Downloads\Classic Life RolePlay\gamemodes\CLRP.pwn(26609) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.
Line 26609:
new tmp[256], tmp2[256], Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index);

Konstantinos
18/01/2012, 01:06 PM
Show us lines 26600 to 26615.

vannesenn
18/01/2012, 01:18 PM
format(string, sizeof(string), "You've set your coord to %f, %f, %f", x, y, z);
SendClientMessage(playerid, 0xBBBBBBAA, string);
}
}
return 1;
}
//warn cmd
dcmd_warn(playerid,params[]) {
if(PlayerInfo[playerid][pAdmin] >= 1) {
new tmp = strtok(params,Index);
new tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /warn [playerid] [reason]");
new warned = strval(tmp), str[128];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
// if(PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");

Konstantinos
18/01/2012, 01:24 PM
You have used it many times. Try this
dcmd_warn(playerid,params[]) {
if(PlayerInfo[playerid][pAdmin] >= 1) {
new Index2, tmp1 = strtok(params, Index2), tmp2 = strtok(params, Index2);
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /warn [playerid] [reason]");
new warned = strval(tmp), str[128];
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
// if(PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");

vannesenn
18/01/2012, 01:27 PM
Now erupted Error
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : error 012: invalid function call, not a valid address
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : warning 215: expression has no effect
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : warning 215: expression has no effect
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : error 001: expected token: ";", but found ")"
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : error 029: invalid expression, assumed zero
C:\Users\Silvio\Desktop\Security RolePlay\gamemodes\SRP.pwn(26608) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


4 Errors.

Kao da su nepopravljivi Errori

thimo
18/01/2012, 01:37 PM
So do what it says put ; there -.-

vannesenn
18/01/2012, 01:45 PM
I am from Croatian. I do not understand you say, a ****** translator something shit. Jel I can queue up to be, we urgently

thimo
18/01/2012, 01:59 PM
So go to the forum and the your own language -.-

vannesenn
18/01/2012, 02:38 PM
You are better workers in the Pawn

niyaz
20/03/2012, 09:08 PM
thimo said this ''Dakle, to što piše stavite, tamo - -.''

Note: Translated :P