Help On Scripting
#1

This the code i put on under onplayertext
Quote:

}
new playname[MAX_PLAYER_NAME], ircMsg[256];
GetPlayerName(playerid, playname, sizeof(playname));
format(ircMsg, sizeof(ircMsg), "[%d]%s: %s", playerid, playname, text);
IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
return 1;
}

error code
Quote:

E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 6) : error 010: invalid function or declaration
E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 : error 010: invalid function or declaration

line 2656 format(ircMsg, "[%d] %s: %s", playerid, playname, text);
line 2658 return 1;
Reply
#2

try this .
Код:
}
	new playname[MAX_PLAYER_NAME], ircMsg[256];
	GetPlayerName(playerid, playname, sizeof(playname));
	format(ircMsg, sizeof(ircMsg), "[%d]%s: %s", playerid, playname, text);
	IRC_GroupSay(gGroupID, IRC_CHANNEL, ircMsg);
	return 1;
}
Reply
#3

Quote:

E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 5) : error 021: symbol already defined: "GetPlayerName"
E:\ServerSamp\WTDM\Samp\gamemodes\lotustdm.pwn(265 : error 010: invalid function or declaration

i get this

Edit:gwe indo
Reply
#4

Plss Help
Reply
#5

PHP код:
public OnPlayerText(playeridtext[])
{
    new 
playname[MAX_PLAYER_NAME], ircMsg[256];
    
GetPlayerName(playeridplaynamesizeof(playname));
    
format(ircMsgsizeof(ircMsg), "[%d] %s: %s"playeridplaynametext);
    
IRC_GroupSay(gGroupIDIRC_CHANNELircMsg);
    return 
0;

Reply
#6

Quote:

error 021: symbol already defined: "OnPlayerText"

i got this
Reply
#7

Remove everything in OnPlayertext even the public define and use this:

PHP код:
public OnPlayerText(playeridtext[]) 

    new 
playname[MAX_PLAYER_NAME], ircMsg[256]; 
    
GetPlayerName(playeridplaynamesizeof(playname)); 
    
format(ircMsgsizeof(ircMsg), "[%d] %s: %s"playeridplaynametext); 
    
IRC_GroupSay(gGroupIDIRC_CHANNELircMsg); 
    return 
0

Reply
#8

I use satdm if i delete of OnPlayertext i will loose my function
Reply
#9

Thx For Help
i delete the OnPlayerText function and replace with code

+rep
Reply
#10

LEL WTF now my chat not showed in game :3 only showed on IRC can help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)