Whats this?
#1

This

Код:
Header size:           1716 bytes
Code size:            25268 bytes
Data size:            25944 bytes
Stack/heap size:      16384 bytes; estimated max. usage=5064 cells (20256 bytes)
Total requirements:   69312 bytes
Got that on compile, never got before, anyone know what it is?
Reply
#2

You are using too much cells... Ex 256. Try not to use 256 in strings all the time.
Reply
#3

oh had like 10 of them... What should i replace them with?

EDIT: What is used before 256 158? or something like that^
Reply
#4

Try using 128.
Reply
#5

ok lets test

EDIT: I Get this

Код:
error 047: array sizes do not match, or destination array is too small
two times these are the lines

pawn Код:
tmp = strtok(cmdtext, idx);
but i have only one 256 string, 256 needed for

pawn Код:
new cmd[256], string[128], tmp[256], idx;
    cmd = strtok(cmdtext, idx);
anything about that? it gives me this but compiles no errors or warnings

Код:
awn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase

Header size:           1716 bytes
Code size:            25268 bytes
Data size:            25940 bytes
Stack/heap size:      16384 bytes; estimated max. usage=4808 cells (19232 bytes)
Total requirements:   69308 bytes
Reply
#6

You should convert to sscanf + zcmd.
Reply
#7

D: I Don't know how to change strcmp to zcmd or sscanf D:
Reply
#8

Here is a quick example, hopefully it helps you understand how to use zcmd & sscanf somewhat... (I'm not so good at explaining things :P)

pawn Код:
CMD:hey(playerid, params[])
{
    new target; //We will store the player in this variable

    //The sscanf line will store the targets's id/name the user entered.
    //If "params" are null (empty), then return a error message to the player...
    if(sscanf(params, "u", target)) return SendClientMessage(playerid, 0xFAFAFAFA, "USAGE: /hey <playerid/name>");

    //If the player is not connected or is invalid, return and error msg
    else if(playerid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFAFAFAFA, "Player not connected or found!");
   
    new str[80];
    format(str, sizeof(str), "%s said hey to you...", pName(playerid));
    //Send the message to the target...
    SendClientMessage(target, 0xFAFAFAFA, str);
    return 1;
}
Reply
#9

lol not really that simple... its a tempban.. not a /hey
Reply
#10

Try #pragma dynamic 6000
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)