Hi
Ne frage
Was is daran falsch Ö
if(strcmp(cmdtext,"/afk",true,4)==0) {
if(!strlen(cmdtext[5])) return SendClientMessage(playerid,COLOR_RED,"/afk Reason");
new name[MAX_PLAYER_NAME], s[100];
GetPlayerName(playerid,name,sizeof(name));
format(s,sizeof(s),"%s is afk, Reason: %s",name,cmdtext[5]);
SendClientMessageToAll(COLOR_RED, str);
TogglePlayerControllable(playerid,0);
return 1;
}
if(strcmp(cmdtext,"/back",true,5)==0) {
new name[MAX_PLAYER_NAME], s[100];
GetPlayerName(playerid,name,sizeof(name));
format(s,sizeof(s),"%s is back",name);
SendClientMessageToAll(COLOR_RED, str);
TogglePlayerControllable(playerid,1);
return 1;
}
AFK/BACK Kleiner Fehler
- [MFE]Nico
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
was ist denn daran falsch? Gibt es errors oder funzt es nicht?
-
diese errors
PHP
Alles anzeigenC:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2112) : warning 219: local variable "name" shadows a variable at a preceding level C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2113) : error 035: argument type mismatch (argument 2) C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2113) : error 035: argument type mismatch (argument 2) C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2115) : error 017: undefined symbol "str" C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2112) : warning 204: symbol is assigned a value that is never used: "name" C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2112 -- 2120) : warning 219: local variable "name" shadows a variable at a preceding level C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2121) : error 035: argument type mismatch (argument 2) C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2121) : error 035: argument type mismatch (argument 2) C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2123) : error 017: undefined symbol "str" C:\PROGRA~1\ROCKST~1\SAMP02~1.WIN\GAMEMO~1\GangWars.pwn(2120) : warning 204: symbol is assigned a value that is never used: "name" Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 6 Errors.
-
eigentlich is doch nichts falsch weils genau das gleiche ist, wie das hier AFK/ BACK frage
-
jop
-
if(strcmp(cmdtext,"/afk",true,4)==0) {
if(!strlen(cmdtext[5])) return SendClientMessage(playerid,COLOR_RED,"/afk Reason");
new name2[MAX_PLAYER_NAME], s[100];
GetPlayerName(playerid,name2,sizeof(name2));
format(s,sizeof(s),"%s is afk, Reason: %s",name2,cmdtext[5]);
SendClientMessageToAll(COLOR_RED, s);
TogglePlayerControllable(playerid,0);
return 1;
}
if(strcmp(cmdtext,"/back",true,5)==0) {
new name2[MAX_PLAYER_NAME], s[100];
GetPlayerName(playerid,name2,sizeof(name2));
format(s,sizeof(s),"%s is back",name2);
SendClientMessageToAll(COLOR_RED, s);
TogglePlayerControllable(playerid,1);
return 1;
} -
breadfish.de
Hat das Thema geschlossen.