PcHawkVich 0 Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 Zdravím potřebuji nějak vyřešit enum při čemž by měla každá proměnná v něm několik různých hodnot, nevím jestli to pořešit jako float nebo jak prostě mrkněte se please na to snad pochopíte čeho jsem chtěl docílit.. díky moc za rady #include #pragma tabsize 0 #define MAX_B 2 enum A_DATA[MAX_B] { id, name[24], Float:position[3] } new aData[MAX_B][A_DATA] enum A_A_DATA[MAX_B] { create, type, overdraft, available, actual } new aaData[MAX_PLAYERS][A_A_DATA][MAX_B]; stock Create(x, y, z, inputtext) { aData[id][position][0] = x; aData[id][position][1] = y; aData[id][position][2] = z; name = inputtext; CreateObject(1, x, y, z, 0.0, 0.0, 0.0); bank_id++; return bank_id; } public OnGameModeInit() { Create(1234.0000, 5678.0000, 10.0000, "xxx"); Create(5678.0000, 1234.0000, 10.0000, "yyy"); Create(1278.0000, 5634.0000, 10.0000, "zzz"); return 1; } public OnPlayerConnect(playerid) { pBank[playerid][create][0] = 0; pBank[playerid][type][0] = 0; pBank[playerid][overdraft][0] = 0; pBank[playerid][available][0] = 0; pBank[playerid][actual][0] = 0; return 1; } Errory C:\Users\Lukáš\Desktop\bank.pwn(7) : error 001: expected token: "{", but found "[" C:\Users\Lukáš\Desktop\bank.pwn(16) : error 001: expected token: ";", but found "enum" C:\Users\Lukáš\Desktop\bank.pwn(29) : error 017: undefined symbol "id" C:\Users\Lukáš\Desktop\bank.pwn(29) : error 029: invalid expression, assumed zero C:\Users\Lukáš\Desktop\bank.pwn(29) : warning 215: expression has no effect C:\Users\Lukáš\Desktop\bank.pwn(29) : error 001: expected token: ";", but found "]" C:\Users\Lukáš\Desktop\bank.pwn(29) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 6 Errors. Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 new aData[MAX_B][A_DATA]; enum A_A_DATA Link to comment Share on other sites More sharing options...
0 PcHawkVich 0 Odesláno: 11. Listopad, 2011 Author Share Odesláno: 11. Listopad, 2011 ? Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 Hore si pridaj ešte new BankCount = -1; stock Create(x, y, z, inputtext[]) { BankCount++; if(BankCount >= MAX_ return print("Moc bánk"); aData[bankCount][position][0] = x; aData[bankCount][position][1] = y; aData[bankCount][position][2] = z; format(aData[bankCount][name],24,inputtext); CreateObject(1, x, y, z, 0.0, 0.0, 0.0); return BankCount; } Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 ? omg pozri si svoje a pozri moje, pochopíš rozdiel Link to comment Share on other sites More sharing options...
0 PcHawkVich 0 Odesláno: 11. Listopad, 2011 Author Share Odesláno: 11. Listopad, 2011 tak teď to mám takhle ale hází to tag mismatch při vyvolání toho stocku #include #pragma tabsize 0 #define MAX_B 2 enum A_DATA { name[24], Float:position[3] } new aData[MAX_B][A_DATA]; new BankCount = -1; enum A_A_DATA { create, type, overdraft, available, actual } new aaData[MAX_PLAYERS][A_A_DATA][MAX_B]; stock Create(x, y, z, inputtext[]) { BankCount++; if(BankCount >= MAX_ return print("Moc bánk"); aData[bankCount][position][0] = x; aData[bankCount][position][1] = y; aData[bankCount][position][2] = z; format(aData[bankCount][name],24,inputtext); CreateObject(1, x, y, z, 0.0, 0.0, 0.0); return BankCount; } public OnGameModeInit() { Create(1234.0000, 5678.0000, 10.0000, "xxx"); Create(5678.0000, 1234.0000, 10.0000, "yyy"); Create(1278.0000, 5634.0000, 10.0000, "zzz"); return 1; } public OnPlayerConnect(playerid) { aaData[playerid][create][0] = 0; aaData[playerid][type][0] = 0; aaData[playerid][overdraft][0] = 0; aaData[playerid][available][0] = 0; aaData[playerid][actual][0] = 0; return 1; } Link to comment Share on other sites More sharing options...
0 Guest Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 stock Create(Float:x, Float:y, Float:z, inputtext[]) Link to comment Share on other sites More sharing options...
0 _Pepa_ 0 Odesláno: 11. Listopad, 2011 Share Odesláno: 11. Listopad, 2011 jéé Link to comment Share on other sites More sharing options...
Dotaz
PcHawkVich 0
Zdravím potřebuji nějak vyřešit enum při čemž by měla každá proměnná v něm několik různých hodnot, nevím jestli to pořešit jako float nebo jak prostě mrkněte se please na to snad pochopíte čeho jsem chtěl docílit.. díky moc za rady
Errory
Link to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now