Plate Posted February 16, 2013 Share Posted February 16, 2013 Hola neceisto una ayuda con este script en el que me ayudo Solidsnake14 y Alex_Steel me dice: Bad Argument @ setPlayerTeam Bad Argument @ getPlayerName [ Expected element at argument 1, got boolean ] attempt to concatentate a boolean valvue client: function deteam (player) local row, col = guiGridListGetSelectedItem ( teamList ) if ( row and col and row ~= -1 and col ~= -1 ) then local team = guiGridListGetItemText ( teamList, row, columnA ) triggerServerEvent ( "onClanPlayerMove", localPlayer, getPlayerFromName ( player ), team ) end end addEventHandler ( "onClientGUIClick", mover, deteam, false ) server: function setTeam(player, teamName) local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then setPlayerTeam ( player , theTeam ) outputChatBox(getPlayerName(source).." agrego a "..getPlayerName(player).." al clan "..getTeamName(theTeam).."", getRootElement(), 0, 255 ,255 ,true) end end addEvent("onClanPlayerMove", true) addEventHandler("onClanPlayerMove",getRootElement(), setTeam) Link to comment
Castillo Posted February 16, 2013 Share Posted February 16, 2013 "player" no esta definido client side. Link to comment
Plate Posted February 16, 2013 Author Share Posted February 16, 2013 function deteam (player) Link to comment
Alexs Posted February 16, 2013 Share Posted February 16, 2013 Es un argumento que no utilizaste. Link to comment
Castillo Posted February 16, 2013 Share Posted February 16, 2013 function deteam (player) Estas cometiendo el mismo error que en el tema donde te ayude hoy. Link to comment
Plate Posted February 16, 2013 Author Share Posted February 16, 2013 guiGridListGetSelectedItem guiGridListGetItemText eso no? Link to comment
Plate Posted February 16, 2013 Author Share Posted February 16, 2013 function deteam (player) local row, col = guiGridListGetSelectedItem ( teamList ) if ( row and col and row ~= -1 and col ~= -1 ) then local row2, col2 = guiGridListGetSelectedItem ( playerList ) if ( row2 and col2 and row2 ~= -1 and col2 ~= -1 ) then local team = guiGridListGetItemText ( teamList, row, columnA ) local player = guiGridListGetItemText ( playerList, row3, column ) triggerServerEvent ( "onClanPlayerMove", localPlayer, getPlayerFromName ( player ), team ) end end addEventHandler ( "onClientGUIClick", mover, deteam, false ) Link to comment
Castillo Posted February 16, 2013 Share Posted February 16, 2013 "row3" no esta definido. Link to comment
Plate Posted February 16, 2013 Author Share Posted February 16, 2013 local player = guiGridListGetItemText ( playerList, row2, column ) Link to comment
Plate Posted February 16, 2013 Author Share Posted February 16, 2013 Si gracias Solid y alex Link to comment
Recommended Posts