sscanf problem.
#1

PHP код:
#include <sscanf2> 
PHP код:
C:\Users\TaLhA XIV\Desktop\Pawno scripter\filterscripts\housesystem.pwn(115) : error 017undefined symbol "params" 
PHP код:
if(sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>"); 
Please help.
Reply
#2

Show all of the CMD dude
Reply
#3

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/createhouse"cmdtexttrue10) == 0)
    {
        if(
IsPlayerAdmin(playerid))
        {
            new 
Float:x,Float:y,Float:z;
            new 
HousePrice,id HouseCount;
            
GetPlayerPos(playerid,x,y,z);
            if(
sscanf(params,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>");
            
HInfo[id][Price] = HousePrice;
            
HInfo[id][XPos] = x;
            
HInfo[id][YPos] = y;
            
HInfo[id][ZPos] = z;
            
HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
            
CreatePickup(1278,1,HInfo[id][XPos],HInfo[id][YPos],HInfo[id][ZPos],-1);
        }
        return 
1;
    } 
Reply
#4

You must use ZCMD, or DCMD or Y_CMD
Reply
#5

Just change 'params' to 'cmdtext'.
Reply
#6

it says OnPlayerCommandText(playerid, cmdtext[]) not OnplayerCommandText(playerid, params[]) so change from params to cmdtext or simply use dcmd or other methods of commands
Reply
#7

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/createhouse", cmdtext, true, 10) == 0)
    {
        if(IsPlayerAdmin(playerid))
        {
            new Float:x,Float:y,Float:z;
            new HousePrice,id = HouseCount;
            GetPlayerPos(playerid,x,y,z);
            if(sscanf(cmdtext,"i",HousePrice)) return SendClientMessage(playerid,-1,"USAGE: /createhouse <price>");
            HInfo[id][Price] = HousePrice;
            HInfo[id][XPos] = x;
            HInfo[id][YPos] = y;
            HInfo[id][ZPos] = z;
            HInfo[id][VirtualWorld] = GetPlayerVirtualWorld(playerid);
            CreatePickup(1278,1,HInfo[id][XPos],HInfo[id][YPos],HInfo[id][ZPos],-1);
        }
        return 1;
    }
Reply
#8

change the params on sscanf to cmdtext.
Reply
#9

Use cmdtext instead of params.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)