ScaRLighT
-
Posts
8 -
Joined
-
Last visited
Content Type
Profiles
Forums
News
Documentation
Posts posted by ScaRLighT
-
-
Problema intalnita (descriere): Dupa ce ma inregistrez ar trebuie sa-mi mai apara dialogul in care iti alegi sexul, dar nu apare si imi muta camera (vezi imaginea).
Ero(area / rile) / warning-(ul / urile): Nu am
Liniile de cod / sursa / script-ul(obligatoriu):function OnPlayerRegister(playerid) { new string[128], hours, minutes, year, month, day, loginstring[128]; PlayerData[playerid][ID] = cache_insert_id(); gettime(hours, minutes); getdate(year, month, day); format(string, sizeof(string), "%02d.%02d.%02d %02d:%02d",day,month,year,hours,minutes); strmid(PlayerData[playerid][RegDate], string, 0, strlen(string), 255); mysql_format(SQL, string,128,"UPDATE `users` SET `RegisterDate`='%s' WHERE `Name`='%s' LIMIT 1",PlayerData[playerid][RegDate],PlayerData[playerid][Name]); mysql_tquery(SQL, string, "", ""); //despre acest dialog este vorba ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_LIST, "Please choose your gender", "Male\nFemale", "Select", "Cancel"); ServerInfo[users]++; strmid(ServerInfo[newestacc], PlayerData[playerid][Name], 0, strlen(PlayerData[playerid][Name]), 255); mysql_format(SQL, loginstring,128,"UPDATE `infos` SET `users`='%d' WHERE ID = 1",ServerInfo[users]); mysql_tquery(SQL, loginstring, "", ""); mysql_format(SQL, loginstring,128,"UPDATE `infos` SET `newestacc`='%s' WHERE ID = 1",ServerInfo[newestacc]); mysql_tquery(SQL, loginstring, "", ""); return 1; }
Iar acesta este codul dialogului:
case DIALOG_GENDER: { if(response) { if(listitem == 0) { PlayerData[playerid][Character] = 250; PlayerData[playerid][Gender] = 1; Update(playerid, CharacterUpdate); Update(playerid, GenderUpdate); //Apoi ar trebui sa treaca la acesta. format(string, sizeof(string), "Account registered, you can login now by typing your password below."); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Abort"); return 0; } if(listitem == 1) { PlayerData[playerid][Character] = 56; PlayerData[playerid][Gender] = 2; Update(playerid, CharacterUpdate); Update(playerid, GenderUpdate); format(string, sizeof(string), "Account registered, you can login now by typing your password below."); ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Abort"); return 0; } } else Kick(playerid); }
Imagini / Video (optional): http://imgur.com/m4obQUQ
Ati incercat sa rezolvati singur?: Da, am incercat. -
Am vazut pe alt server ca se pot aprinde cand apesi H. Am sa incerc metoda lui Mister.
Multumesc!
-
Problema intalnita (descriere): Am adaugat girofar (19419) pe un infernus, dar nu stiu cum sa-l fac sa se aprinda apasand tasta H.
Ero(area / rile) / warning-(ul / urile): -
Liniile de cod / sursa / script-ul(obligatoriu): -
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: Am cautat informatii dar n-am gasit nimic pentru nu stiu ce anume sa caut.PS: Pe timp de ziua nu vad girofarul aprins nici la celelalte masini, daca imi puteti explica de ce.
-
Unde trebuie sa pun baza de date ? ma rog ajutatima.
Asta te va ajuta sa intelegi ce ai de facut.
Este un GM reusit din cate vad 5/5
-
Acolo nu este
stock right(source[], len)
ci asastock right(source[], len)
mi s-au pus in plus cand am pus BBCode pawno
-
Acum imi da alte erori :
(2082) : error 001: expected token: "-identifier-", but found "(" (2083) : error 029: invalid expression, assumed zero (2084) : error 029: invalid expression, assumed zero (2084) : error 029: invalid expression, assumed zero (2084) : error 029: invalid expression, assumed zero (2084) : fatal error 107: too many error messages on one line
[pawn]stock right(source[], len)
{
new retval(MAX_STRING), srclen;
srclen = strlen(source);
strmid(retval, source, srclen - len, srclen, MAX_STRING);
return retval;
}[/pawn]
-
C:\Documents and Settings\Alexyo\Desktop\GameZone\gamemodes\GameZone.pwn(2077) : error 009: invalid array size (negative, zero or out of bounds) C:\Documents and Settings\Alexyo\Desktop\GameZone\gamemodes\GameZone.pwn(2077) : error 029: invalid expression, assumed zero C:\Documents and Settings\Alexyo\Desktop\GameZone\gamemodes\GameZone.pwn(2077) : error 017: undefined symbol "srclen" C:\Documents and Settings\Alexyo\Desktop\GameZone\gamemodes\GameZone.pwn(2077) : fatal error 107: too many error messages on one line
[pawn]stock right(source[], len)
{
new retval[MAX_STRING], srclen; - 2077
srclen = strlen(source);
strmid(retval, source, srclen - len, srclen, MAX_STRING);
return retval;
}[/pawn]
Nu imi apare un dialog
in Arhivă probleme
Posted · Edited by ScaRLighT
Problem solved!
EDIT: Am rezolvat problema. Era din cauza unor tabele din MySQL care nu aveau default value. Erorile mi-au aparut ulterior.