Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2009-08-26, 20:28


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6569 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Usu?
Kod:

new gDrivebyCount


Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 09:51


Sweet007







Wiek: 34
Na forum: 6260 dni
Posty: 14

Piwa: 17

Respekt: 50

nie ma czego? takiego nie wyszukuje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 11:07


zmudzix







Wiek: 39
Na forum: 6247 dni
Posty: 3



Respekt: 50

Witam ja mam takie co? :
Kod:

C:\DOCUME~1\PAWE~1\Pulpit\servik\GAMEMO~1\RP.pwn(6088) : error 025: function heading differs from prototype C:\DOCUME~1\PAWE~1\Pulpit\servik\GAMEMO~1\RP.pwn(6164) : error 025: function heading differs from prototype Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 2 Errors.


Prosz? o pomoc dam :piwo: gdzie mam zmienic te funkcje i w jaki spos?b

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 11:23


Pelo

Streetball is My Job






Wiek: 32
Na forum: 6569 dni
Posty: 32

Piwa: 124

Respekt: 27,3

Ostrzeżeń: 80%
Sweet007, widze mapa gandziarza :x wejdz w include "new" i usu?

Kod:

new gDrivebyCount


zmudzix, podaj linijki.

Podpis


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 17:19


donior

Is Pro






Wiek: 30
Na forum: 6462 dni
Posty: 24

Piwa: 226

Respekt: 40,5

Ostrzeżeń: 20%
siemka mam error 10 ale nie bardzo rozumie poradnik


Kod:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/setramp ", cmdtext, true, 9) == 0)
{
new ramp = strval(cmdtext[9]);
if (ramp < 0 || ramp >= sizeof(ramptypes)) {
SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
} else {
playerramptypes[playerid] = ramp;
}
// return 1;
}
if(strcmp(cmdtext,"/rampon",true)==0) {
playerramptypes[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN,"W??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
}
return 1;
}

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 18:55


Michalec

Dokładnie.






Wiek: 30
Na forum: 6503 dni
Posty: 163
Nick w MP: []Damianos[]

Piwa: 99

Respekt: 86,6

Daj tak:
Kod:

if (strcmp("/setramp", cmdtext, true, 8) == 0)
{
new ramp = strval(cmdtext[8]);
if (ramp < 0 || ramp >= sizeof(ramptypes)) {
SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
} else {
playerramptypes[playerid] = ramp;
}
return 1;
}
if(strcmp(cmdtext,"/rampon",true)==0) {
playerramptypes[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN,"W??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 19:11


donior

Is Pro






Wiek: 30
Na forum: 6462 dni
Posty: 24

Piwa: 226

Respekt: 40,5

Ostrzeżeń: 20%
nie dzia?a to moze ca?e dam jak cos



Kod:

#include <a_samp>

#define COLOR_GREEN 0x33AA33AA
new keydown[MAX_PLAYERS] = {false, ...};
new rampid[MAX_PLAYERS] = {-1, ...};
forward Keys();
forward RemoveRamp(playerid);
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);

new ramptypes[] = {
1503, // curvy normal one
1660, // concrete one with pipes
1245, // plank of wood against a box
1631, // water ramp with rocks
1632, // normal water ramp
1655, // wide water ramp
};

new playerramptypes[MAX_PLAYERS] = {0, ...};

public OnFilterScriptInit()
{
SetTimer("Keys", 100, 1);
return 1;
}

public Keys()
{
new keys, updown, leftright, playerid;
new Float:x, Float:y, Float:z, Float:angle;
for (playerid = 0; playerid < MAX_PLAYERS; playerid++) {
if (IsPlayerConnected(playerid)) {
GetPlayerKeys(playerid, keys, updown, leftright);
if (keys & KEY_ACTION && IsPlayerInAnyVehicle(playerid)) {
if (!keydown[playerid]) {
keydown[playerid] = true;
if (rampid[playerid] == -1) {
GetPlayerPos(playerid, x, y, z);
angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
switch (playerramptypes[playerid]) {
case 2:
{
angle -= 90.0;
if (angle < 0.0) angle += 360.0;
z += 0.5;
}
case 1:
{
z -= 0.5;
}
}
rampid[playerid] = CreateObject(ramptypes[playerramptypes[playerid]], x, y, z - 0.5, 0.0, 0.0, angle);
SetTimerEx("RemoveRamp", 2000, 0, "d", playerid);
}
}
} else keydown[playerid] = false;
}
}
}

public OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/setramp", cmdtext, true, 8) == 0)
{
new ramp = strval(cmdtext[8]);
if (ramp < 0 || ramp >= sizeof(ramptypes)) {
SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
} else {
playerramptypes[playerid] = ramp;
}
return 1;
}
if(strcmp(cmdtext,"/rampon",true)==0) {
playerramptypes[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN,"W??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

public RemoveRamp(playerid)
{
if (rampid[playerid] != -1) {
DestroyObject(rampid[playerid]);
rampid[playerid] = -1;
}
}

public OnFilterScriptExit()
{
for (new i=0; i<MAX_PLAYERS; i++)
{
if (rampid[i] != -1) DestroyObject(rampid[i]);
}
}

Float:GetOptimumRampDistance(playerid)
{
new ping = GetPlayerPing(playerid), Float:dist;
dist = floatpower(ping, 0.25);
dist = dist*4.0;
dist = dist+5.0;
return dist;
}

Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
else GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
return a;
}



[ Dodano: 2009-08-27, 19:11 ]
nie dzia?a to moze ca?e dam jak cos



Kod:

#include <a_samp>

#define COLOR_GREEN 0x33AA33AA
new keydown[MAX_PLAYERS] = {false, ...};
new rampid[MAX_PLAYERS] = {-1, ...};
forward Keys();
forward RemoveRamp(playerid);
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);

new ramptypes[] = {
1503, // curvy normal one
1660, // concrete one with pipes
1245, // plank of wood against a box
1631, // water ramp with rocks
1632, // normal water ramp
1655, // wide water ramp
};

new playerramptypes[MAX_PLAYERS] = {0, ...};

public OnFilterScriptInit()
{
SetTimer("Keys", 100, 1);
return 1;
}

public Keys()
{
new keys, updown, leftright, playerid;
new Float:x, Float:y, Float:z, Float:angle;
for (playerid = 0; playerid < MAX_PLAYERS; playerid++) {
if (IsPlayerConnected(playerid)) {
GetPlayerKeys(playerid, keys, updown, leftright);
if (keys & KEY_ACTION && IsPlayerInAnyVehicle(playerid)) {
if (!keydown[playerid]) {
keydown[playerid] = true;
if (rampid[playerid] == -1) {
GetPlayerPos(playerid, x, y, z);
angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
switch (playerramptypes[playerid]) {
case 2:
{
angle -= 90.0;
if (angle < 0.0) angle += 360.0;
z += 0.5;
}
case 1:
{
z -= 0.5;
}
}
rampid[playerid] = CreateObject(ramptypes[playerramptypes[playerid]], x, y, z - 0.5, 0.0, 0.0, angle);
SetTimerEx("RemoveRamp", 2000, 0, "d", playerid);
}
}
} else keydown[playerid] = false;
}
}
}

public OnPlayerCommandText(playerid, cmdtext[])
if (strcmp("/setramp", cmdtext, true, 8) == 0)
{
new ramp = strval(cmdtext[8]);
if (ramp < 0 || ramp >= sizeof(ramptypes)) {
SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
} else {
playerramptypes[playerid] = ramp;
}
return 1;
}
if(strcmp(cmdtext,"/rampon",true)==0) {
playerramptypes[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN,"W??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

public RemoveRamp(playerid)
{
if (rampid[playerid] != -1) {
DestroyObject(rampid[playerid]);
rampid[playerid] = -1;
}
}

public OnFilterScriptExit()
{
for (new i=0; i<MAX_PLAYERS; i++)
{
if (rampid[i] != -1) DestroyObject(rampid[i]);
}
}

Float:GetOptimumRampDistance(playerid)
{
new ping = GetPlayerPing(playerid), Float:dist;
dist = floatpower(ping, 0.25);
dist = dist*4.0;
dist = dist+5.0;
return dist;
}

Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
else GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
return a;
}



Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 19:23


Michalec

Dokładnie.






Wiek: 30
Na forum: 6503 dni
Posty: 163
Nick w MP: []Damianos[]

Piwa: 99

Respekt: 86,6

Podaj jakie masz b?edy i daj tak:
Kod:

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}
return 0;
}


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-27, 23:19


donior

Is Pro






Wiek: 30
Na forum: 6462 dni
Posty: 24

Piwa: 226

Respekt: 40,5

Ostrzeżeń: 20%
teraz takie


C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(73) : warning 209: function "OnPlayerCommandText" should return a value
C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(73) : error 010: invalid function or declaration
C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(77) : error 010: invalid function or declaration
C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(80) : error 010: invalid function or declaration
C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(84) : error 010: invalid function or declaration
C:\DOCUME~1\Naraaya\Pulpit\ramps.pwn(86) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


5 Errors.

Podpis


[shadow=red]Służę pomocą na forum.. Nie na Gadu, ani PW!
Nie mam czasu na bzdety, szczególnie, że jest ich
cholernie dużo
[/shadow]
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-28, 12:42


zmudzix







Wiek: 39
Na forum: 6247 dni
Posty: 3



Respekt: 50

Jakie liniki bo ja nie kumaty jestem ca?kiem w pawno

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-28, 13:02


Zurrek







Wiek: 30
Na forum: 6545 dni
Posty: 312
Nick w MP: Zurrek

Piwa: 1890

Respekt: 50

Cytat:

C:\DOCUME~1\PAWE~1\Pulpit\servik\GAMEMO~1\RP.pwn(6088) : error 025: function heading differs from prototype C:\DOCUME~1\PAWE~1\Pulpit\servik\GAMEMO~1\RP.pwn(6164) : error 025: function heading differs from prototype Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 2 Errors.

Po ka?dej ?cie?ce np. "C:\DOCUME~1\PAWE~1\Pulpit\servik\GAMEMO~1\RP.pwn" w nawiasach pisze nr linijki. Znajd? ka?d? linijk? i tutaj podaj.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-28, 14:34


Michalec

Dokładnie.






Wiek: 30
Na forum: 6503 dni
Posty: 163
Nick w MP: []Damianos[]

Piwa: 99

Respekt: 86,6

Kod:

#include <a_samp>

#define COLOR_GREEN 0x33AA33AA
new keydown[MAX_PLAYERS] = {false, ...};
new rampid[MAX_PLAYERS] = {-1, ...};
forward Keys();
forward RemoveRamp(playerid);
forward Float:GetOptimumRampDistance(playerid);
forward Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance);

new ramptypes[] = {
1503, // curvy normal one
1660, // concrete one with pipes
1245, // plank of wood against a box
1631, // water ramp with rocks
1632, // normal water ramp
1655, // wide water ramp
};

new playerramptypes[MAX_PLAYERS] = {0, ...};

public OnFilterScriptInit()
{
SetTimer("Keys", 100, 1);
return 1;
}

public Keys()
{
new keys, updown, leftright, playerid;
new Float:x, Float:y, Float:z, Float:angle;
for (playerid = 0; playerid < MAX_PLAYERS; playerid++) {
if (IsPlayerConnected(playerid)) {
GetPlayerKeys(playerid, keys, updown, leftright);
if (keys & KEY_ACTION && IsPlayerInAnyVehicle(playerid)) {
if (!keydown[playerid]) {
keydown[playerid] = true;
if (rampid[playerid] == -1) {
GetPlayerPos(playerid, x, y, z);
angle = GetXYInFrontOfPlayer(playerid, x, y, GetOptimumRampDistance(playerid));
switch (playerramptypes[playerid]) {
case 2:
{
angle -= 90.0;
if (angle < 0.0) angle += 360.0;
z += 0.5;
}
case 1:
{
z -= 0.5;
}
}
rampid[playerid] = CreateObject(ramptypes[playerramptypes[playerid]], x, y, z - 0.5, 0.0, 0.0, angle);
SetTimerEx("RemoveRamp", 2000, 0, "d", playerid);
}
}
} else keydown[playerid] = false;
}
}
}

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/setramp", cmdtext, true, 8) == 0)
{
new ramp = strval(cmdtext[8]);
if (ramp < 0 || ramp >= sizeof(ramptypes)) {
SendClientMessage(playerid, 0xFFFFFFAA, "Invalid ramp ID.");
} else {
playerramptypes[playerid] = ramp;
}
return 1;
}
if(strcmp(cmdtext,"/rampon",true)==0) {
playerramptypes[playerid] = 0;
SendClientMessage(playerid, COLOR_GREEN,"W??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}

if (strcmp(cmdtext,"/rampoff",true)==0) {
playerramptypes[playerid] = -1;
SendClientMessage(playerid, COLOR_GREEN,"Wy??czy?e? rampy!");
SendClientMessage(playerid, COLOR_GREEN,"BRAWOOOOO!!!!!!");
return 1;
}
return 0;
}

public RemoveRamp(playerid)
{
if (rampid[playerid] != -1) {
DestroyObject(rampid[playerid]);
rampid[playerid] = -1;
}
}

public OnFilterScriptExit()
{
for (new i=0; i<MAX_PLAYERS; i++)
{
if (rampid[i] != -1) DestroyObject(rampid[i]);
}
}

Float:GetOptimumRampDistance(playerid)
{
new ping = GetPlayerPing(playerid), Float:dist;
dist = floatpower(ping, 0.25);
dist = dist*4.0;
dist = dist+5.0;
return dist;
}

Float:GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x, y, a);
if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
else GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
return a;
}


Teraz powinno by? ok ;) Nie da?e? klamry otwieraj?cej po publicku onplayercom... xD

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-28, 23:23


donior

Is Pro






Wiek: 30
Na forum: 6462 dni
Posty: 24

Piwa: 226

Respekt: 40,5

Ostrzeżeń: 20%
michalec masz brofca ale teraz mam problem z innym skryptem


Kod:

#include <a_samp>

#define COLOR_YELLOW 0xFFFF00AA
#define WARN_COLOR 0xFF0000AA
#define COLOR_LIGHTBLUE 0x33CCFFAA

public OnPlayerCommandText(playerid, cmdtext[])
{

if (strcmp(cmdtext, "/admin-tele", true)==0 && (IsPlayerAdmin(playerid))) {
SetPlayerPos(playerid,2211.7878,1044.0953,80.2385);
return 1;
}




error
Kod:


C:\DOCUME~1\Naraaya\Pulpit\hjhgjg.pwn(14) : error 030: compound statement not closed at the end of file (started at line 10)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-28, 23:25


-Destroyer-







Wiek: 33
Na forum: 6798 dni
Posty: 21

Piwa: 5049

Respekt: 50

Ostrzeżeń: 40%
Kod:

#include <a_samp>

#define COLOR_YELLOW 0xFFFF00AA
#define WARN_COLOR 0xFF0000AA
#define COLOR_LIGHTBLUE 0x33CCFFAA

public OnPlayerCommandText(playerid, cmdtext[])
{

if (strcmp(cmdtext, "/admin-tele", true)==0 && (IsPlayerAdmin(playerid))) {
SetPlayerPos(playerid,2211.7878,1044.0953,80.2385);
return 1;
}
return 0;
}


Postaw piwo autorowi tego posta
 

 
Wysłany: 2009-08-30, 22:15


PeLLe







Wiek: 38
Na forum: 6446 dni
Posty: 14



Respekt: 50

Kod:

C:\Documents and Settings\X\Pulpit\Plikacze\sa-extreme.pl-Server_SenDog\sa-extreme.pl-Server SenDog\samp02Xserver.win32\gamemodes\monster.pwn(520) : error 025: function heading differs from prototype

C:\Documents and Settings\X\Pulpit\Plikacze\sa-extreme.pl-Server_SenDog\sa-extreme.pl-Server SenDog\samp02Xserver.win32\gamemodes\monster.pwn(524) : error 035: argument type mismatch (argument 1)

Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.


Ja mam takie b?edy to chodzi co? z OnPlayerCommandText

Postaw piwo autorowi tego posta
 

 
Tagi: błędy :: przy :: kompilacji :: rozwiązanie
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » PAWN » BŁĘDY PRZY KOMPILACJI - ROZWIĄZANIE Odpowiedz do tematu

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku