C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2294) : error 035: argument type mismatch (argument 1) C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 017: undefined symbol "glob0" C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : warning 215: expression has no effect C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 001: expected token: ";", but found "]" C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 029: invalid expression, assumed zero C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : fatal error 107: too many error messages on one line
if(!IsPlayerConnected(playerid)) { return 0; } if(GetPlayerState(playerid) == 2) { new var0 = 0; while(++var0 < 200) { //2409 line --> if(IsPlayerInRangeOfPoint(playerid, 1077936128, glob0[var0][1], glob0[var0][2], glob0[var0][3])) { if(glob0[var0][0] == 1) { new var1 = 0, var2 = 0, var3 = 0, var4 = 0; new var5 = GetPlayerVehicleID(playerid); GetVehicleDamageStatus(var5, var1, var2, var3, var4); var4 = functionAC4(1, 1, 1, 1); UpdateVehicleDamageStatus(var5, var1, var2, var3, var4); return 0; } } } }
public OnPlayerCommandText(playerid, cmdtext[]) { new var0[256]; new var1 = 0; //2294 line --> var0 = functionB38(cmdtext, var1); if(!strcmp(var0, "/spygliai", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } new Float:var2 = 0.0, Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0; GetPlayerPos(playerid, var2, var3, var4); GetPlayerFacingAngle(playerid, var5); function360(var2, var3, var4, var5); return 1; } if(!strcmp(var0, "/spygliaip", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } function810(playerid); SendClientMessage(playerid, 0x10F441AA, "Panaikinai paskutinius padetus spyglius."); return 1; } if(!strcmp(var0, "/spygliaivs", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } function644(); SendClientMessage(playerid, 0x10F441AA, "Panaikinai visus spyglius."); return 1; } return 0; }
Error codes
Код:
C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2294) : error 035: argument type mismatch (argument 1) C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 017: undefined symbol "glob0" C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : warning 215: expression has no effect C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 001: expected token: ";", but found "]" C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : error 029: invalid expression, assumed zero C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2409) : fatal error 107: too many error messages on one line Код:
if(!IsPlayerConnected(playerid)) { return 0; } if(GetPlayerState(playerid) == 2) { new var0 = 0; while(++var0 < 200) { //2409 line --> if(IsPlayerInRangeOfPoint(playerid, 1077936128, glob0[var0][1], glob0[var0][2], glob0[var0][3])) { if(glob0[var0][0] == 1) { new var1 = 0, var2 = 0, var3 = 0, var4 = 0; new var5 = GetPlayerVehicleID(playerid); GetVehicleDamageStatus(var5, var1, var2, var3, var4); var4 = functionAC4(1, 1, 1, 1); UpdateVehicleDamageStatus(var5, var1, var2, var3, var4); return 0; } } } } Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new var0[256]; new var1 = 0; //2294 line --> var0 = functionB38(cmdtext, var1); if(!strcmp(var0, "/spygliai", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } new Float:var2 = 0.0, Float:var3 = 0.0, Float:var4 = 0.0, Float:var5 = 0.0; GetPlayerPos(playerid, var2, var3, var4); GetPlayerFacingAngle(playerid, var5); function360(var2, var3, var4, var5); return 1; } if(!strcmp(var0, "/spygliaip", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } function810(playerid); SendClientMessage(playerid, 0x10F441AA, "Panaikinai paskutinius padetus spyglius."); return 1; } if(!strcmp(var0, "/spygliaivs", true)) { if(Policininkas[playerid] == false) { return SendClientMessage(playerid, 0x10F441AA, "Љi komanda policininkams."); } function644(); SendClientMessage(playerid, 0x10F441AA, "Panaikinai visus spyglius."); return 1; } return 0; } |
functionB38(arg0, &arg1) { new var0 = strlen(arg0); while(arg1 < var0 && arg0[arg1] <= 32) { arg1++; } new var1 = arg1; new var2[20]; while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19) { var2[arg1 - var1] = arg0[arg1]; arg1++; } var2[arg1 - var1] = 0; return var2; }
Where is defined glob0?
What's the prototype of functionB38() (in meaning: what are the formal arguments for it)? Greetings. |
functionB38(arg0, &arg1) { new var0 = strlen(arg0); while(arg1 < var0 && arg0[arg1] <= 32) { arg1++; } new var1 = arg1; new var2[20]; while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19) { var2[arg1 - var1] = arg0[arg1]; arg1++; } var2[arg1 - var1] = 0; return var2; }
Код:
functionB38(arg0, &arg1) { new var0 = strlen(arg0); while(arg1 < var0 && arg0[arg1] <= 32) { arg1++; } new var1 = arg1; new var2[20]; while(arg1 < var0 && arg0[arg1] > 32 && arg1 - var1 < 19) { var2[arg1 - var1] = arg0[arg1]; arg1++; } var2[arg1 - var1] = 0; return var2; } |
functionB38(cmdtext, var1);
functionB38(arg0[], &arg1)
{
// ...
new a = 0;
functionB38("abc def", a); // Must be 'a' because of reference. Isn't it pointless?
// returns: abc and 3 (assigned to a)
Where is defined glob0?
What's the prototype of functionB38() (in meaning: what are the formal arguments for it)? Greetings. |
So, this function can be executed for non-array arguments.
pawn Код:
pawn Код:
The way I see it, is that it just returns part of string, starting at index of arg1 and ending in space (32) sign, and also assigns the value of variable sent via reference to number of characters returned by this command (length, string not it's size) pawn Код:
Greetings |
C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2427) : warning 213: tag mismatch C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2428) : warning 213: tag mismatch C:\Users\Core i5\Desktop\GRP4 EDITED\gamemodes\grandlarc.pwn(2429) : warning 213: tag mismatch Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 3 Warnings.
function360(Float:arg0, Float:arg1, Float:arg2, Float:arg3) { for(new var0 = 0; var0 < 200; var0++) { if(!glob0[var0][0]) { glob0[var0][0] = 1; 2427 --> glob0[var0][1] = arg0; 2428--> glob0[var0][2] = arg1; 2429--> glob0[var0][3] = arg2 - 0.6999; glob0[var0][4] = CreateObject(2899, arg0, arg1, arg2 - 0.8999, 0.0, 0.0, arg3 - 90, 0); return 1; } } return 0; }