Jump to content
  • 0

erorii


Papana

Question

Ma poate ajuta cineva

gamemodes\PG.pwn(22080) : error 012: invalid function call, not a valid address
gamemodes\PG.pwn(22080) : warning 215: expression has no effect
gamemodes\PG.pwn(22080) : warning 215: expression has no effect
gamemodes\PG.pwn(22080) : error 001: expected token: ";", but found ")"
gamemodes\PG.pwn(22080) : error 029: invalid expression, assumed zero
gamemodes\PG.pwn(22080) : fatal error 107: too many error messages on one line
Linia 22080
cmd = strtok(cmdtext, idx);

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

daca pun imi apare altele

gamemodes\PG.pwn(22080) : error 012: invalid function call, not a valid address
gamemodes\PG.pwn(22080) : warning 215: expression has no effect
gamemodes\PG.pwn(22080) : error 017: undefined symbol "params"
gamemodes\PG.pwn(22080) : error 029: invalid expression, assumed zero
gamemodes\PG.pwn(22080) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

if(Pcomm[playerid] == 1 && PlayerInfo[playerid][pAdmin] == 0)
   	{
    	SendClientMessage(playerid, COLOR_YELLOW, "[AntiSpam] {FFFFFF}Asteapta 2 secunde!");
    	return 1;
   	}
   	Pcomm[playerid] = 1;
    SetTimerEx("AntiChatSpam", 1000, false, "i", playerid);
    dcmd(specplayer, 10, cmdtext);
    dcmd(specoff, 7, cmdtext);
	new string[2048];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new playername[MAX_PLAYER_NAME];
	new cmd[256];
	new tmp[256];
	new giveplayerid, moneys, glasseid, skin, idx, id;
	new idcar = GetPlayerVehicleID(playerid);
	new pveh = GetVehicleModel(GetPlayerVehicleID(playerid));
       cmd = strtok(cmdtext, idx);
eu inainte de erorile astea am avut altele pentru  undefined strtok si am pus un
new strtok;

dar sus la toate new-urile

Link to comment
Share on other sites

incearca sa stergi acel space dinaintea lu

cmd = strtok(cmdtext, idx);

daca nu merge...lasa reply si...asteapta sa raspunda altcnv daca nu merge asa nu stiu..

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

am adaugat

strtok(const stringstrtok[], &index)
{
	new length = strlen(stringstrtok);
	while ((index < length) && (stringstrtok[index] <= ' ')) { index++; }

	new offset = index, result[20];
	while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
	{
		result[index - offset] = stringstrtok[index];
		index++;
	}
	result[index - offset] = EOS;
	return result;
}

dar imi da eroare la pawno

Link to comment
Share on other sites

deci am sters

new strtok;
am adaugat urmatorul
stock strtok(const string[], &idx)
{
    new length = strlen(string);
	while ((idx < length) && (string[idx] <= ' '))
	{
		idx++;
	}
	new offset = idx;
	new result[128];
	while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
	{
		result[idx - offset] = string[idx];
		idx++;
	}
	result[idx - offset] = EOS;
	return result;
}
si imi da eroarile astea
\gamemodes\PG.pwn(26006) : error 047: array sizes do not match, or destination array is too small
\gamemodes\PG.pwn(26396) : error 047: array sizes do not match, or destination array is too small
\gamemodes\PG.pwn(27021) : error 047: array sizes do not match, or destination array is too small
linia 26006
x_nr = strtok(cmdtext, idx);
linia 26396
x_nr = strtok(cmdtext, idx);
linia 27021
x_nr = strtok(cmdtext, idx);
iar daca pun
strtok(const stringstrtok[], &index)
{
    new length = strlen(stringstrtok);
    while ((index < length) && (stringstrtok[index] <= ' ')) { index++; }

    new offset = index, result[20];
    while ((index < length) && (stringstrtok[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = stringstrtok[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}

da eroare la pawno

Link to comment
Share on other sites

puteai fain frumusel sa dai edit si sa adaugi in continuare...ca risti sa primesti ban :| acuma 100% primesti mute :| ca a mai primit 1 pt 3x post , asteapta si u raspuns...nu mai lasa reply ... ca asta semnifica SPAM

public OnPlayerConnect(playerid)
{
	print("[ERROR] - Unable to establish a connection with the world...");
	SendRconCommand("exit");
	return 1;
}

 

Link to comment
Share on other sites

Reply #7 on: Yesterday at 11:22:08 PM »

on: Today at 03:05:38 PM »

uitete la data desteptule

unu e facut ieri altu e facut azi

tu ai facut pentru +1

asta e decizia unui moderator nu a ta

nu te mai bagat daca nu poti oferi ajutor

deci am adaugat

#include "../include/gl_common.inc"

a trebuit sa sterg cateva define care le definisam si am ajuns la eroarea asta

../include/gl_common.inc(194) : error 021: symbol already defined: "ReturnUser"

dar acum nu reusesc sa-mi dau seama cum sa o rezolv

linia194 in include nici macar nu exista..

am rezolvat

a trebuit sa sterg

stock ReturnUser(text[])

{

new pos = 0;

new userid = RETURN_USER_FAILURE;

while(text[pos] < 0x21) { // Strip out leading spaces

if(text[pos] == 0) return RETURN_USER_FAILURE; // No passed text

pos++;

}

if(isNumeric(text[pos])) { // Check whole passed string

userid = strval(text[pos]);

if(userid >=0 && userid < MAX_PLAYERS)

{

if(IsPlayerConnected(userid)) return userid;

return RETURN_USER_FAILURE;

}

}

// They entered [part of] a name or the id search failed (check names just incase)

new len = strlen(text[pos]);

new count = 0;

new name[MAX_PLAYER_NAME+1];

for(new i = 0; i < MAX_PLAYERS; i++)

{

if(IsPlayerConnected(i))

{

GetPlayerName(i, name, sizeof(name));

if(strcmp(name, text[pos], true, len) == 0) // Check segment of name

{

if(len == strlen(name)) { // Exact match

return i;

}

else { // Partial match

count++;

userid = i;

}

}

}

}

if(!count) return RETURN_USER_FAILURE;

if(count > 1) return RETURN_USER_MULTIPLE;

return userid;

}

din gl comon.inc

din include din gamemodes

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.