help with spawn error - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help with spawn error (
/showthread.php?tid=117059)
help with spawn error -
rs2fun111 - 31.12.2009
pawn Код:
public OnPlayerSpawn(playerid)
{
if (IsPlayerLAdmin(playerid))
new str;
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "[KFS] Member %s Joined To Server Welcome Back!", str);
SendClientMessageToAll(COLOR_DARKGREEN, str);
return 1;
}
errors
Код:
C:\Users\kalvi\Desktop\sa-mp\pawno\include\IsPlayerLAdmin.inc(15) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1009) : error 003: declaration of a local variable must appear in a compound block
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1009) : error 017: undefined symbol "str"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1009) : warning 215: expression has no effect
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1010) : error 017: undefined symbol "str"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1010) : error 017: undefined symbol "str"
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1010) : error 029: invalid expression, assumed zero
C:\Users\kalvi\Desktop\sa-mp\gamemodes\kfsr2.pwn(1010) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
6 Errors.
Re: help with spawn error -
fsnameless - 31.12.2009
pawn Код:
public OnPlayerSpawn(playerid)
{
new PlayerName[MAX_PLAYER_NAME], str[128];
if(IsPlayerLAdmin(playerid))
{
GetPlayerName(playerid, PlayerName,MAX_PLAYER_NAME);
format(str, 70, "[KFS] Member %s Joined To Server Welcome Back!", PlayerName);
SendClientMessageToAll(COLOR_DARKGREEN, str);
return 1;
}
return 0;
}
Try That
Re: help with spawn error -
rs2fun111 - 31.12.2009
no errors thank you
Re: help with spawn error -
fsnameless - 31.12.2009
did it work cause i was just guessing on what to do =P