sscanf problem
#1

begginnning (it isn't the fulll script)
PHP Code:
new DMZone[MAX_PLAYERS]; 
after onplayercommand text
PHP Code:
dcmd(t,1,cmdtext);// 
the last GM lines
PHP Code:
dcmd_t(playeridparams[])
{
    new 
string33[256], messageName;
    if(
sscanf(params"z"message)) return SendClientMessage(playeridCOLOR_ORANGE"Usage: /T [Text]");
    
format(string33sizeof(string33), "[TeamChat] %s (%d): %s"Name(playerid), playeridmessage);//20010
    
for(new 0MAX_PLAYERSi++)
    {
             if(
IsPlayerConnected(i))
            {
                 if(
DMZone(i) == DMZone(playerid))    SendClientMessage(iYELLOWstring33);
            }
    }
    return 
1;

errors and warnings:
Quote:

FULLHOUSE.pwn(20010) : error 012: invalid function call, not a valid address
FULLHOUSE.pwn(20010) : warning 215: expression has no effect
FULLHOUSE.pwn(20010) : error 001: expected token: ";", but found ")"
FULLHOUSE.pwn(20010) : error 029: invalid expression, assumed zero
FULLHOUSE.pwn(20010) : fatal error 107: too many error messages on one line

Reply
#2

Shoud be DMZone[i] not DMZone(i)

Not an sscanf related problem at all ..
Reply
#3

nothing

for example there is a code
DMZone[playerid] = 1;
DMZone[playerid] = 2;
and so
Reply
#4

can anyone help?
Reply
#5

Change the for loop to:
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i++)
    {
             if(IsPlayerConnected(i))
            {
                 if(DMZone[i] == DMZone[playerid])    SendClientMessage(i, YELLOW, string33);
            }
    }
Makes sense doesn't it?
Reply
#6

it doesen't work

i have done an other a minute 1 testing that
Reply
#7

and the sscanf is the best plugin, i think

sry Y_Less but it's the truth
Reply
#8

ooooo it's working

by the way, what server do you have Y_Less?
Reply
#9

At this forum we have some rules:


* No SPAM. If you are adding no useful information to a topic, you are spamming.

* Some people apparently think they are important enough to bump their own topic after 10 minutes.
You can bump topics when the last reply is at least 12 hours old, and it needs to have useful information about your problem.
Reply
#10

ok thx for the answer
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)