13.08.2014, 18:36
Hi there guys, sorry for my bad english, but I'm having some errors and warnings in the /try system that i make. I wanted a /try system, I didn't find nothing in the internet about it so I decide to invent and do my own system using random, so the logic is, if random = 0, the try is successful, but if random = 1, isn't successful, so the try fails.
I guess the logic is good but the code as some errors that i can't detect, if any of you could help me with the errors and the warnings i would be apreciate.
Code:
Errors:
I guess the logic is good but the code as some errors that i can't detect, if any of you could help me with the errors and the warnings i would be apreciate.
Code:
Код HTML:
CMD:tentar(playerid, params[]) // [PT] tentar = [EN] try { static string[144], text[120], name[MAX_PLAYER_NAME], Float: pX, Float: pY, Float: pZ; GetPlayerName(playerid, name, sizeof(name)); if(sscanf(params, "s[120]", text)) return SendClientMessage(playerid, cinzento, "Usa /tentar [Aзгo]"); // [EN]Usa /try [Action] new value = random(1); // so that's how I make my teory format(string, sizeof(string), "%s tenta %s", name, text); // Formating the message GetPlayerPos(playerid, pX, pY, pZ); foreach(new i: Player) { if(IsPlayerInRangeOfPoint(i, 6.0, pX, pY, pZ)) { if value="0" { SendClientMessage(i, roxo, string, "e consegue*"); } if value="1" { SendClientMessage(i, roxo, string, "e falha*"); // roxo = purple, " e falha " = " and fails " } } } return 1; }
PHP код:
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(46) : warning 211: possibly unintended assignment
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(47) : error 029: invalid expression, assumed zero
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(48) : warning 202: number of arguments does not match definition
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(50) : warning 211: possibly unintended assignment
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(51) : error 029: invalid expression, assumed zero
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(52) : warning 202: number of arguments does not match definition
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(58) : warning 217: loose indentation
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(51) : warning 204: symbol is assigned a value that is never used: "value"